var Qmail = {};
(function() {
	var c = YAHOO.util.Dom, e = YAHOO.util.Event;
	CHATTY.namespace("CHATTY.cls");
	var b = YAHOO.util.Dom;
	var a = YAHOO.util.Event;
	var d = YAHOO.util.CustomEvent;
	CHATTY.cls.Tab = function(g, h, f) {
		this.tabs = [];
		this.currentTab = null;
		this.config = {
			defaultIndex : 0,
			triggerEvent : "click",
			slideEnabled : false,
			slideInterval : 3 * 60 * 1000,
			slideDelay : 300,
			autoInit : true,
			onShow : function() {
			}
		};
		this.setConfig(f);
		this.onShow = new d("onShow", this);
		this.onShow.subscribe(this.config.onShow);
		if (g && h) {
			this.addRange(g, h);
			if (this.config.autoInit) {
				this.init();
			}
		}
	};
	CHATTY.cls.Tab.prototype = {
		setConfig : function(f) {
			if (!f) {
				return
			}
			for ( var g in f) {
				this.config[g] = f[g]
			}
		},
		add : function(tab) {
			if (!tab) {
				return
			}
			var f = b.get(tab.trigger);
			var g = b.get(tab.sheet);
			if (f) {
				this.tabs.push(tab);
				f.style.display = "block";
			}
		},
		addRange : function(h, j) {
			if (!h || !j) {
				return
			}
			if (h.length && j.length && h.length == j.length) {
				for ( var g = 0, f = h.length; g < f; g++) {
					this.add( {
						trigger : h[g],
						sheet : j[g]
					})
				}
			}
		},
		select : function(f) {
			if (!f || (!!this.currentTab && f.trigger == this.currentTab.trigger)) {
				return
			}
			if (this.currentTab) {
				b.removeClass(this.currentTab.trigger, "current");
				if (this.currentTab.sheet) {
					this.currentTab.sheet.style.display = "none"
				}
			}
			this.currentTab = f;
			this.show()
		},
		cancelSelected : function() {
			if (this.currentTab) {
				b.removeClass(this.currentTab.trigger, "current");
				if (this.currentTab.sheet) {
					this.currentTab.sheet.style.display = "none"
				}
			}
			this.currentTab = null
		},
		remove : function(g) {
			if (!g) {
				return
			}
			if (g.trigger) {
				b.removeClass(g.trigger, "current");
				g.trigger.style.display = "none"
			}
			if (g.sheet) {
				g.sheet.style.display = "none"
			}
			var f = this.indexOf(g);
			this.tabs.splice(f, f);
			if (g.trigger == this.currentTab.trigger) {
				if (f == 0) {
					this.select(this.tabs[(f + 1)])
				} else {
					this.select(this.tabs[(f - 1)])
				}
			}
		},
		show : function() {
			if (this.currentTab.trigger) {
				this.currentTab.trigger.style.display = "block"
			}
			b.addClass(this.currentTab.trigger, "current");
			if (this.currentTab.sheet) {
				this.currentTab.sheet.style.display = "block"
			}
			this.onShow.fire(this.currentTab)
		},
		slide : function() {
			var i = this.config, l = this, j, g;
			b.batch(this.tabs, function(m) {
				a.on( [ m.trigger, m.sheet ], "mouseover", f);
				a.on( [ m.trigger, m.sheet ], "mouseout", h)
			});
			k();
			function k() {
				var m = l.indexOf(l.currentTab);
				if (m == -1) {
					return
				}
				j = window.setInterval(function() {
					var n = l.tabs[++m % l.tabs.length];
					if (n) {
						l.select(n)
					}
				}, i.slideInterval)
			}
			function f() {
				window.clearTimeout(g);
				window.clearInterval(j)
			}
			function h() {
				g = window.setTimeout(k, i.slideDelay)
			}
		},
		indexOf : function(h) {
			for ( var g = 0, f = this.tabs.length; g < f; g++) {
				if (h.trigger == this.tabs[g].trigger) {
					return g
				}
			}
			return -1
		},
		init : function() {
			var f = this.config, g = this;
			b.batch(this.tabs, function(h) {
				a.on(h.trigger, f.triggerEvent, function(i) {
					a.stopEvent(i);
					g.select.call(g, h)
				});
				if (h.sheet) {
					h.sheet.style.display = "none"
				}
			});
			this.select(this.tabs[f.defaultIndex]);
			if (f.slideEnabled) {
				this.slide()
			}
		}
	};
	CHATTY.addFav = function(f, g) {
		if (window.sidebar && "object" == typeof (window.sidebar) && "function" == typeof (window.sidebar.addPanel)) {
			window.sidebar.addPanel(g, f, "")
		} else {
			if (document.all && "object" == typeof (window.external)) {
				window.external.addFavorite(f, g)
			}
		}
	};
	a.on(b.get("site_setHome"), "click", function() {
		var g = window.location;
		var i = this;
		g = "http://web.qq.com/";
		try {
			i.style.behavior = "url(#default#homepage)";
			i.setHomePage(g)
		} catch (h) {
			if (window.netscape) {
				try {
					netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
				} catch (h) {
					alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。")
				}
				try {
					var f = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
					f.setCharPref("browser.startup.homepage", g)
				} catch (h) {
				}
			}
		}
	});
	a.on(b.get("site_addFav"), "click", function() {
		var f = window.location;
		f = "http://web.qq.com/";
		CHATTY.addFav(f, "WebQQ - QQ 网页版")
	});
	CHATTY.cls.MainPanel = function(ao) {
		if (typeof (ao) !== "string") {
			throw new Error("CHATTY.cls.MainPanel call failed, the parameter(" + ao + ")'s type is not string!")
		}
		this._qqclient = CHATTY.obj.QQClient;
		this.defaultSignature = "编辑个性签名";
		this._id = "Main_" + ao;
		this._id_pre = this._id + "_";
		this._newWin = {};
		this._group_el = {};
		this._sysMsgBox = [];
		this._taskbar_id = this._id_pre + "tf";
		var L = this._id_pre + "minimize";
		var K = this._id_pre + "close";
		var r = this._id_pre + "sta_mnu";
		var m = this._id_pre + "set_mnu";
		var am = this._id_pre + "ext_mnu";
		var s = this._id_pre + "cls_mnu";
		var X = this._id_pre + "face_panel";
		var aa = this._id_pre + "swc_sta";
		var ac = this._id_pre + "sta_mnu_pos";
		var x = this._id_pre + "user_nick";
		var af = this._id_pre + "title";
		var ad = this._id_pre + "qqtitle_exit";
		var h = this._id_pre + "man_statistic";
		var G = this._id_pre + "girl_statistic";
		var Y = this._id_pre + "total_statistic";
		var A = this._id_pre + "friend";
		var ae = this._id_pre + "class";
		var U = this._id_pre + "class_list";
		var ai = this._id_pre + "content_area";
		var I = this._id_pre + "show_qzoneBlog";
		var al = this._id_pre + "qzoneBlog_head";
		var l = this._id_pre + "qzoneBlog_close";
		var aj = this._id_pre + "qzoneBlog_title";
		var y = this._id_pre + "qzoneBlog_datetime";
		var w = this._id_pre + "qzoneBlog_content";
		var n = this._id_pre + "friend_offmsg";
		var ap = this._id_pre + "friend_offmsg_ig";
		var au = this._id_pre + "friend_offmsg_ex";
		var S = this._id_pre + "class_offmsg";
		var f = this._id_pre + "class_offmsg_ig";
		var q = this._id_pre + "class_offmsg_ex";
		var an = this._id_pre + "mail_msg";
		var at = this._id_pre + "mail_msg_ex";
		var C = this._id_pre + "search_input";
		var ar = this._id_pre + "search_button";
		var ah = this._id_pre + "friend_msg_count";
		var R = this._id_pre + "friend_msg_link";
		var aq = this._id_pre + "class_msg_count";
		var W = this._id_pre + "class_msg_link";
		var k = this._id_pre + "mail_count";
		var D = this._id_pre + "mail_link";
		var Z = this._id_pre + "friend_msg_count2";
		var Q = this._id_pre + "class_msg_count2";
		var F = this._id_pre + "mail_count2";
		var H = this._id_pre + "friend_offmsg_area";
		var J = this._id_pre + "friend_offmsg_area_h";
		var B = this._id_pre + "friend_offmsg_area_c";
		var v = this._id_pre + "class_offmsg_area";
		var t = this._id_pre + "class_offmsg_area_h";
		var p = this._id_pre + "class_offmsg_area_c";
		var z = this._id_pre + "mail_msg_area";
		var P = this._id_pre + "mail_msg_area_h";
		var M = this._id_pre + "mail_msg_area_c";
		var o = this._id_pre + "friend_impression";
		var ag = document.getElementById(this._id);
		this._eleRef = ag;
		this._my_avatar_node = c.get(this._id + "_my_avatar");
		e.on(this._my_avatar_node, "click", this.clickMyAvatarIconHandler, this, true);
		this._my_avatar_img_node = c.get(this._id + "_my_avatar_img");
		this._my_info_node = c.get(this._id + "_my_info");
		this._WebApp_loading_node = c.get("WebApp_loading");
		this._main_leftpanel_el = c.get(this._id + "_main_leftpanel");
		this._buddy_list_panel_el = c.get(this._id + "_buddy_list_panel");
		this._buddyListPanelWidth = 220;
		this._webqqTopHeight = 63;
		this._taskbarHeight = 53;
		this._status_menu_button_node = c.get(this._id + "_status_menu_button");
		this._my_qqlevel_button_node = c.get(this._id + "_my_qqlevel_button");
		this._my_qqlevel_panel_node = c.get(this._id + "_my_qqlevel_panel");
		this._title_el = c.get(af);
		this._qzone_button_node = c.get(this._id_pre + "qzone_button");
		this._signature_el = c.get(this._id_pre + "signature");
		this._signature_input_el = c.get(this._id + "_signature_input");
		this._qq_lock_button_el = c.get(this._id + "_qq_lock_button");
		this._qqtitle_exit_el = c.get(ad);
		this._tabs_setting_el = c.get(this._id + "_tabs_setting_button");
		this._recommend_list_el = c.get(this._id + "_recommend_list");
		this._weather_button_el = c.get("WeatherButton");
		this._WeatherPic_el = c.get("WeatherPic");
		this._CityAndTemperature_el = c.get("CityAndTemperature");
		this._more_weather_board_el = c.get("MoreWeatherBoard");
		this._setting_menu_el = c.get(this._id_pre + "setting_menu");
		this._message_marquee_el = c.get(this._id_pre + "message_marquee");
		this._message_marquee_inner_el = c.get(this._id_pre + "message_marquee_inner");
		this._no_message_marquee_el = c.get(this._id_pre + "no_message_marquee");
		e.on(this._message_marquee_el, "click", this.mf_openMarqueeMsg, this, true);
		this._man_statistic_el = c.get(h);
		this._girl_statistic_el = c.get(G);
		this._total_statistic_el = c.get(Y);
		this._user_list_option_el = c.get(this._id + "_user_list_option");
		this._add_buddy_button_el = c.get(this._id + "_add_buddy_button");
		e.on(this._add_buddy_button_el, "click", this.mf_openAddBuddyTab, this, true);
		this._buddy_manager_button_el = c.get(this._id + "_buddy_manager_button");
		e.on(this._buddy_manager_button_el, "click", this.mf_openBuddyManagerTab, this, true);
		this._user_list_el = c.get(this._id_pre + "user_list");
		this._qqgroup_list_option_el = c.get(this._id_pre + "qqgroup_list_option");
		this._class_list_el = c.get(U);
		this._user_friend_el = c.get(A);
		this._user_class_el = c.get(ae);
		this._content_area_el = c.get(ai);
		this._show_qzoneBlog_el = c.get(I);
		this._qzoneBlog_head_el = c.get(al);
		this._qzoneBlog_close_el = c.get(l);
		this._qzoneBlog_title_el = c.get(aj);
		this._qzoneBlog_datetime_el = c.get(y);
		this._qzoneBlog_content_el = c.get(w);
		this._friend_offmsg_el = c.get(n);
		this._friend_offmsg_ex_el = c.get(au);
		this._class_offmsg_el = c.get(S);
		this._class_offmsg_ex_el = c.get(q);
		this._mail_msg_el = c.get(an);
		this._mail_msg_re_el = c.get(this._id_pre + "mail_msg_re");
		this._mail_msg_ex_el = c.get(at);
		this._sysmsg_el = c.get(this._id_pre + "sysmsg");
		this._sysmsg_ex_el = c.get(this._id_pre + "sysmsg_ex");
		this._search_input_el = c.get(C);
		this._search_button_el = c.get(ar);
		this._all_msg_count_el = c.get(this._id_pre + "all_msg_count");
		this._friend_msg_link_ref = c.get(R);
		this._friend_msg_count_ref = c.get(ah);
		this._friend_msg_count2_ref = c.get(Z);
		this._class_msg_link_ref = c.get(W);
		this._class_msg_count_ref = c.get(aq);
		this._class_msg_count2_ref = c.get(Q);
		this._mail_link_ref = c.get(D);
		this._mail_count_ref = c.get(k);
		this._mail_count2_ref = c.get(F);
		this._sysmsg_link_ref = c.get(this._id_pre + "sysmsg_link");
		this._sysmsg_count_ref = c.get(this._id_pre + "sysmsg_count");
		this._sysmsg_count2_ref = c.get(this._id_pre + "sysmsg_count2");
		this._friend_offmsg_area_el = c.get(H);
		this._friend_offmsg_area_h_el = c.get(J);
		this._friend_offmsg_area_c_el = c.get(B);
		this._class_offmsg_area_el = c.get(v);
		this._class_offmsg_area_h_el = c.get(t);
		this._class_offmsg_area_c_el = c.get(p);
		this._mail_msg_area_el = c.get(z);
		this._mail_msg_area_h_el = c.get(P);
		this._mail_msg_area_c_el = c.get(M);
		this._sysmsg_area_el = c.get(this._id_pre + "sysmsg_area");
		this._sysmsg_area_h_el = c.get(this._id_pre + "sysmsg_area_h");
		this._sysmsg_area_c_el = c.get(this._id_pre + "sysmsg_area_c");
		this._cover_layer_node = c.get(this._id + "_cover_layer");
		this._sysbox_node = c.get(this._id + "_sysbox");
		this._buddy_details_loading_node = c.get(this._id + "_buddy_details_loading");
		this._buddy_details_loadend_node = c.get(this._id + "_buddy_details_loadend");
		this._buddyDetails_view_button_node = c.get("BuddyDetails_view_button");
		this._buddyDetails_qzone_panel_node = c.get("BuddyDetails_qzone_panel");
		this._buddyDetails_buddy_impression_panel_node = c.get("BuddyDetails_buddy_impression_panel");
		this._buddyDetails_modify_ok_button_node = c.get("BuddyDetails_modify_ok_button");
		this._buddyDetails_avatar_node = c.get("BuddyDetails_avatar");
		this._buddyDetails_nickname_node = c.get("BuddyDetails_nickname");
		this._buddyDetails_nickname_2_node = c.get("BuddyDetails_nickname_2");
		this._buddyDetails_qqlevel_node = c.get("BuddyDetails_qqlevel");
		this._buddyDetails_signature_node = c.get("BuddyDetails_signature");
		this._buddyDetails_uin_node = c.get("BuddyDetails_uin");
		this._buddyDetails_realname_container1_node = c.get("BuddyDetails_realname_container1");
		this._buddyDetails_realname_node = c.get("BuddyDetails_realname");
		this._buddyDetails_realname_input_node = c.get("BuddyDetails_realname_input");
		e.on(this._buddyDetails_realname_input_node, "keydown", this.onKeydownRealnameInput, this, true);
		e.on(this._buddyDetails_realname_input_node, "keyup", this.checkRealnameInputInDetails, this, true);
		e.on(this._buddyDetails_realname_input_node, "blur", this.checkRealnameInputInDetails, this, true);
		this._buddyDetails_sex_node = c.get("BuddyDetails_sex");
		this._buddyDetails_age_node = c.get("BuddyDetails_age");
		this._buddyDetails_bloodtype_node = c.get("BuddyDetails_bloodtype");
		this._buddyDetails_shengxiao_node = c.get("BuddyDetails_shengxiao");
		this._buddyDetails_constellation_node = c.get("BuddyDetails_constellation");
		this._buddyDetails_country_node = c.get("BuddyDetails_country");
		this._buddyDetails_province_node = c.get("BuddyDetails_province");
		this._buddyDetails_city_node = c.get("BuddyDetails_city");
		this._buddyDetails_city2_node = c.get("BuddyDetails_city2");
		this._buddyDetails_mobile_node = c.get("BuddyDetails_mobile");
		this._buddyDetails_phone_node = c.get("BuddyDetails_phone");
		this._buddyDetails_email_node = c.get("BuddyDetails_email");
		this._buddyDetails_language_node = c.get("BuddyDetails_language");
		this._buddyDetails_occupation_node = c.get("BuddyDetails_occupation");
		this._buddyDetails_college_node = c.get("BuddyDetails_college");
		this._buddyDetails_homepage_node = c.get("BuddyDetails_homepage");
		this._buddyDetails_ps_node = c.get("BuddyDetails_ps");
		this._buddyDetails_remarks_node = c.get("BuddyDetails_remarks");
		this._buddyDetails_buddy_qzone_node = c.get("BuddyDetails_buddy_qzone");
		this._buddyDetails_last_blog_node = c.get("BuddyDetails_last_blog");
		this._buddyDetails_impression_node = c.get("BuddyDetails_impression");
		this._buddyDetails_tab_head_node = c.get("Main_mainwindow_buddy_details_tab_head_text");
		var g = document.createElement("DIV");
		g.id = r;
		g.className = "switch-status";
		g.style.display = "none";
		g.innerHTML = '<a href="#" class="online">在线</a><a href="#" class="away">离开</a><a href="#" class="hidden">隐身</a><a href="#" class="offline">离线</a><a href="#" class="exit">退出</a>';
		document.body.appendChild(g);
		this._status_menu_panel_node = g;
		this._chatlogMenuPanelEl = c.get("chatlogMenuPanel");
		this._chatlogViewButtonEl = c.get("chatlogViewButton");
		this._chatlogExportButtonEl = c.get("chatlogExportButton");
		e.on(this._chatlogViewButtonEl, "mousedown", this.clickChatlogViewButton, this, true);
		e.on(this._chatlogExportButtonEl, "mousedown", this.clickChatlogExportButton, this, true);
		var g = document.createElement("DIV");
		g.id = m;
		g.className = "sportvoice";
		g.style.display = "none";
		g.innerHTML = '<div><a href="#"><span class="openvoice"></span>开启声音提示</a></div><div><a href="#"><span class="closevoice"></span>关闭声音提示</a></div><div><a href="#"><span class="shieldingallmessage"></span>屏蔽所有消息(仅使用消息盒子)</a></div>';
		document.body.appendChild(g);
		this._setting_menu_panel_node = g;
		this._shield_grounp_msg_el = c.get("shield_grounp_msg");
		var T = document.createElement("DIV");
		T.className = "keyboard";
		T.style.display = "none";
		T.innerHTML = '<a href=""><span></span><span>按Enter键发送消息</span></a><a href=""><span></span><span>按Ctrl+Enter键发送消息</span></a><a href=""><span></span><span>以上两者均可发送消息</span></a>';
		document.body.appendChild(T);
		T.childNodes[Math.max(this._qqclient.getBitValue(30, 2) - 1, 0)].childNodes[0].className = "changeway";
		this._sset_panel_ref = T;
		if (!this._qqclient.isMaskSound()) {
			this._setting_menu_el.className = "voice";
			this._setting_menu_el.title = "声音已开启"
		}
		if (this._qqclient.getBitValue(27, 2) == 3) {
			this._setting_menu_el.className = "noallvoice";
			this._setting_menu_el.title = "所有消息已屏蔽"
		}
		var O = document.createElement("DIV");
		O.className = "search";
		O.style.display = "none";
		O.innerHTML = '<a href="#"><span>x</span><span>(50095826)</span></a><a href="#"><span>x</span><span>(50095826)</span></a>';
		document.body.appendChild(O);
		this._search_panel_ref = O;
		var E = document.createElement("DIV");
		E.className = "usercard";
		E.style.display = "none";
		E.innerHTML = '<div class="userAvatar">									<span><img id="QQTips_avatar" class="avatar" src="images/qq_avatar_shadow.gif" alt="...!" title="发起会话..." /></span>									<span id="BuddyOnlineStateInTips">状态</span>								</div>								<div class="userSimpleInfoInTips">										<div class="quickPanelInTips">											<a id="BuddyQzoneInTips" class="qzoneButtonInTips" href="#" target="_blank" title="进入Qzone!">Qzone</a>											<a id="SendEmailButtonInTips" class="sendEmailButtonInTips" href="'
				+ qmail_server_domain
				+ '/cgi-bin/login?Fun=clientwrite&vm=pt&email=4765078@qq.com" target="_blank" title="发送邮件">发送邮件</a>										</div>										<a id="QQTips_buddy_name" class="buddyNameInTips" href="###" uin="" title="查看资料">QQ昵称</a>										<div id="BuddySignatureInTips" class="signatureInTips">加载中...</div>										<div id="BuddyQQLevelInTips" class="buddyQQLevelInTips" title="等级:"></div>									</ul>								</div>								<div id="'
				+ o
				+ '" class="buddyImpressionInTips">									<div class="userys"></div>									<div class="bewriteInTips"><a href="#">我来评价</a></div>								</div>								<div id="BuddyOptionPanel">									<div class="buddyOptionTab">										<a id="RemoveBuddyButtonInTips" style="display:none;" href="###" title="删除好友">删除</a>										<a id="MoveBuddyButtonInTips" style="display:none;" href="###" title="移动分组">移动到</a>										<a id="ModifyRemarkButtonInTips" style="display:none;" href="###" title="修改备注">修改备注</a>										<a id="ViewBuddyDetailsButtonInTips" style="display:none;" uin="" href="###" title="查看资料">查看资料</a>									</div>									<div>										<div id="RemoveBuddyPanelInTips" class="optionPanelBoxInTipsA" style="display:none;">											<div class="optionPanelArrowInTips1">箭头</div>											<div class="removeBuddyInnerInTips">												<span>确认删除此好友？</span>												<a id="RemoveBuddyConfirmButtonInTips" href="#">确定</a>												<a id="RemoveBuddyCancelButtonInTips" href="#">取消</a>											</div>										</div>										<div id="MoveBuddyPanelInTips" class="optionPanelBoxInTipsB" style="display:none;">											<div class="optionPanelArrowInTips2">箭头</div>											<div id="MyBuddyClassListInTips" class="myBuddyClassListInTips"></div>										</div>										<div id="ModifyRemarkPanelInTips" class="optionPanelBoxInTipsA" style="display:none;">											<div class="optionPanelArrowInTips3">箭头</div>											<input id="RemarkInputInTips" class="remarkInputInTips" uin="" type="text" maxleng="16" />											<div id="ModifyRemarkSendButtonInTips" class="modifyRemarkSendButtonInTips" title="确定(快捷键：Enter)">确定</div>										</div>										<div id="ViewBuddyDetailsPanelInTips" style="display:none;"></div>									</div>								</div>								<div id="StrangerOptionPanel">									<div class="buddyOptionTab">										<a id="AddBuddyButtonInTips" style="display:none;" href="###" title="加为好友">加为好友</a>										<a id="ViewBuddyDetailsButtonInTips2" style="display:none;" uin="" href="###" title="查看资料">查看资料</a>									</div>									<div>										<div id="AddBuddyPanelInTips"></div>										<div id="AddBuddyPanelInTips"></div>									</div>								</div>';
		document.body.appendChild(E);
		this._private_info_panel_ref = E;
		this._QQTips_avatar_node = c.get("QQTips_avatar");
		this._BuddyOnlineStateInTips_node = c.get("BuddyOnlineStateInTips");
		this._BuddyQzoneInTips_node = c.get("BuddyQzoneInTips");
		this._SendEmailButtonInTips_node = c.get("SendEmailButtonInTips");
		this._BuddySignatureInTips_node = c.get("BuddySignatureInTips");
		this._BuddyQQLevelInTips_node = c.get("BuddyQQLevelInTips");
		e.on(this._QQTips_avatar_node, "click", this.mf_ChatWithUser, this, true);
		this._QQTips_buddy_name_node = c.get("QQTips_buddy_name");
		e.on(this._QQTips_buddy_name_node, "click", this.clickViewBuddyDetailsInTips, this);
		this._BuddyOptionPanel_node = c.get("BuddyOptionPanel");
		this._RemoveBuddyButtonInTips_node = c.get("RemoveBuddyButtonInTips");
		this._MoveBuddyButtonInTips_node = c.get("MoveBuddyButtonInTips");
		this._ModifyRemarkButtonInTips_node = c.get("ModifyRemarkButtonInTips");
		this._ViewBuddyDetailsButtonInTips_node = c.get("ViewBuddyDetailsButtonInTips");
		this._RemoveBuddyPanelInTips_node = c.get("RemoveBuddyPanelInTips");
		this._MoveBuddyPanelInTips_node = c.get("MoveBuddyPanelInTips");
		this._ModifyRemarkPanelInTips_node = c.get("ModifyRemarkPanelInTips");
		this._ViewBuddyDetailsPanelInTips_node = c.get("ViewBuddyDetailsPanelInTips");
		this._RemoveBuddyConfirmButtonInTips_node = c.get("RemoveBuddyConfirmButtonInTips");
		this._RemoveBuddyCancelButtonInTips_node = c.get("RemoveBuddyCancelButtonInTips");
		this._MyBuddyClassListInTips_node = c.get("MyBuddyClassListInTips");
		this._RemarkInputInTips_node = c.get("RemarkInputInTips");
		this._ModifyRemarkSendButtonInTips_node = c.get("ModifyRemarkSendButtonInTips");
		e.on(this._RemarkInputInTips_node, "keyup", this.checkRealnameInputInTips, this, true);
		e.on(this._RemarkInputInTips_node, "blur", this.checkRealnameInputInTips, this, true);
		e.on(this._ViewBuddyDetailsButtonInTips_node, "click", this.clickViewBuddyDetailsInTips, this);
		e.on(this._MyBuddyClassListInTips_node, "click", this.clickMyBuddyClassListInTips, this, true);
		this.buddyOptionTabInTips = new CHATTY.cls.Tab();
		this.buddyOptionTabInTips.add( {
			trigger : this._RemoveBuddyButtonInTips_node,
			sheet : this._RemoveBuddyPanelInTips_node
		});
		this.buddyOptionTabInTips.add( {
			trigger : this._MoveBuddyButtonInTips_node,
			sheet : this._MoveBuddyPanelInTips_node
		});
		this.buddyOptionTabInTips.add( {
			trigger : this._ModifyRemarkButtonInTips_node,
			sheet : this._ModifyRemarkPanelInTips_node
		});
		this.buddyOptionTabInTips.add( {
			trigger : this._ViewBuddyDetailsButtonInTips_node,
			sheet : this._ViewBuddyDetailsPanelInTips_node
		});
		this.buddyOptionTabInTips.config.triggerEvent = "click";
		this.buddyOptionTabInTips.config.slideEnabled = false;
		this.buddyOptionTabInTips.onShow.subscribe(function(av, i) {
			var aw = CHATTY.obj.QQClient.mainPanel;
			aw.resetUserCardPosition(aw._currentUserCardEl);
			switch (i[0].trigger) {
			case aw._ModifyRemarkButtonInTips_node:
				aw._RemarkInputInTips_node.value = aw._qqclient.bdylist.allUsers[aw._RemarkInputInTips_node.getAttribute("uin")].remark || "";
				aw._RemarkInputInTips_node.focus();
				break;
			default:
				break
			}
		});
		this.buddyOptionTabInTips.setConfig( {
			defaultIndex : -1
		});
		this.buddyOptionTabInTips.init();
		e.on(this._ModifyRemarkSendButtonInTips_node, "click", this.clickModifyRemarkSendButtonInTips, this, true);
		e.on(this._RemarkInputInTips_node, "keydown", this.keydownModifyRemarkSendButtonInTips, this, true);
		e.on(this._RemoveBuddyConfirmButtonInTips_node, "click", this.handleClickRemoveBuddy, this, true);
		e.on(this._RemoveBuddyCancelButtonInTips_node, "click", this.cancelBuddyOptionSelected, this, true);
		this._StrangerOptionPanel_node = c.get("StrangerOptionPanel");
		this._AddBuddyButtonInTips_node = c.get("AddBuddyButtonInTips");
		this._ViewBuddyDetailsButtonInTips2_node = c.get("ViewBuddyDetailsButtonInTips2");
		this._AddBuddyPanelInTips_node = c.get("AddBuddyPanelInTips");
		this._ViewBuddyDetailsPanelInTips2_node = c.get("ViewBuddyDetailsPanelInTips2");
		e.on(this._ViewBuddyDetailsButtonInTips2_node, "click", this.clickViewBuddyDetailsInTips, this);
		this.strangerOptionTabInTips = new CHATTY.cls.Tab();
		this.strangerOptionTabInTips.add( {
			trigger : this._AddBuddyButtonInTips_node,
			sheet : this._AddBuddyPanelInTips_node
		});
		this.strangerOptionTabInTips.add( {
			trigger : this._ViewBuddyDetailsButtonInTips2_node,
			sheet : this._ViewBuddyDetailsPanelInTips2_node
		});
		this.strangerOptionTabInTips.config.triggerEvent = "click";
		this.strangerOptionTabInTips.config.slideEnabled = false;
		this.strangerOptionTabInTips.onShow.subscribe(function(av, i) {
			var aw = CHATTY.obj.QQClient.mainPanel;
			aw.resetUserCardPosition(aw._currentUserCardEl)
		});
		this.strangerOptionTabInTips.setConfig( {
			defaultIndex : -1
		});
		this.strangerOptionTabInTips.init();
		g = document.createElement("DIV");
		g.id = am;
		g.className = "yuimenu select-status exit-status";
		g.style.visibility = "hidden";
		g.innerHTML = '<div class="left"></div><div class="bd middle"><ul class="first-of-type"><li class="yuimenuitem"><a class="yuimenuitemlabel offline" href="#">退出</a></li></ul></div><div class="right"></div>';
		this._ext_menu_ref = g;
		g = document.createElement("DIV");
		g.id = s;
		g.className = "yuimenu class-right-key";
		g.style.visibility = "hidden";
		g.innerHTML = '<div class="top"><div class="left"></div><div class="right"></div><div class="middle"></div></div><div class="middle-area"><div class="left"></div><div class="right"></div><div class="middle"><a href="#">发送群消息</a><a href="#" class="selected">接受并提示消息</a><a href="#">屏蔽消息(只显示消息数目)</a></div></div><div class="bottom"><div class="left"></div><div class="right"></div><div class="middle"></div></div>';
		this._cls_menu_ref = g;
		var ab = document.createElement("DIV");
		ab.id = X;
		ab.style.display = "none";
		ab.className = "face";
		ab.innerHTML = '<div class="faceBg"><div class="faceImg"><a title="[/:)]" id="qqface_0" ></a><a title="[/:~]" id="qqface_1"></a><a title="[/:B]" id="qqface_2"></a><a title="[/:|]" id="qqface_3"></a><a title="[/8-)]" id="qqface_4"></a><a title="[/:<]" id="qqface_5"></a><a title="[/:$]" id="qqface_6"></a><a title="[/:X]" id="qqface_7"></a><a title="[/:Z]" id="qqface_8"></a><a title="[/:\'(]" id="qqface_9"></a><a title="[/:-|]" id="qqface_10"></a><a title="[/:@]" id="qqface_11"></a><a title="[/:P]" id="qqface_12"></a><a title="[/:D]" id="qqface_13"></a><a title="[/:O]" id="qqface_14"></a><a title="[/:(]" id="qqface_15"></a><a title="[/:+]" id="qqface_16"></a><a title="[/--b]" id="qqface_17"></a><a title="[/:Q]" id="qqface_18"></a><a title="[/:T]" id="qqface_19"></a><a title="[/;P]" id="qqface_20"></a><a title="[/;-D]" id="qqface_21"></a><a title="[/;d]" id="qqface_22"></a><a title="[/;o]" id="qqface_23"></a><a title="[/:g]" id="qqface_24"></a><a title="[/|-)]" id="qqface_25"></a><a title="[/:!]" id="qqface_26"></a><a title="[/:L]" id="qqface_27"></a><a title="[/:>]" id="qqface_28"></a><a title="[/:;]" id="qqface_29"></a><a title="[/;f]" id="qqface_30"></a><a title="[/:-S]" id="qqface_31"></a><a title="[/?]" id="qqface_32"></a><a title="[/;x]" id="qqface_33"></a><a title="[/;@]" id="qqface_34"></a><a title="[/:8]" id="qqface_35"></a><a title="[/;!]" id="qqface_36"></a><a title="[/!!!]" id="qqface_37"></a><a title="[/xx]" id="qqface_38"></a><a title="[/bye]" id="qqface_39"></a><a title="[/wipe]" id="qqface_40"></a><a title="[/dig]" id="qqface_41"></a><a title="[/handclap]" id="qqface_42"></a><a title="[/&-(]" id="qqface_43"></a><a title="[/B-)]" id="qqface_44"></a><a title="[/<@]" id="qqface_45"></a><a title="[/@>]" id="qqface_46"></a><a title="[/:-O]" id="qqface_47"></a><a title="[/>-|]" id="qqface_48"></a><a title="[/P-(]" id="qqface_49"></a><a title="[/:\'|]" id="qqface_50"></a><a title="[/X-)]" id="qqface_51"></a><a title="[/:*]" id="qqface_52"></a><a title="[/@x]" id="qqface_53"></a><a title="[/8*]" id="qqface_54"></a><a title="[/pd]" id="qqface_55"></a><a title="[/<W>]" id="qqface_56"></a><a title="[/beer]" id="qqface_57"></a><a title="[/basketb]" id="qqface_58"></a><a title="[/oo]" id="qqface_59"></a><a title="[/coffee]" id="qqface_60"></a><a title="[/eat]" id="qqface_61"></a><a title="[/pig]" id="qqface_62"></a><a title="[/rose]" id="qqface_63"></a><a title="[/fade]" id="qqface_64"></a><a title="[/showlove]" id="qqface_65"></a><a title="[/heart]" id="qqface_66"></a><a title="[/break]" id="qqface_67"></a><a title="[/cake]" id="qqface_68"></a><a title="[/li]" id="qqface_69"></a><a title="[/bome]" id="qqface_70"></a><a title="[/kn]" id="qqface_71"></a><a title="[/footb]" id="qqface_72"></a><a title="[/ladybug]" id="qqface_73"></a><a title="[/shit]" id="qqface_74"></a><a title="[/moon]" id="qqface_75"></a><a title="[/sun]" id="qqface_76"></a><a title="[/gift]" id="qqface_77"></a><a title="[/hug]" id="qqface_78"></a><a title="[/strong]" id="qqface_79"></a><a title="[/weak]" id="qqface_80"></a><a title="[/share]" id="qqface_81"></a><a title="[/v]" id="qqface_82"></a><a title="[/@)]" id="qqface_83"></a><a title="[/jj]" id="qqface_84"></a><a title="[/@@]" id="qqface_85"></a><a title="[/bad]" id="qqface_86"></a><a title="[/loveu]" id="qqface_87"></a><a title="[/no]" id="qqface_88"></a><a title="[/ok]" id="qqface_89"></a><a title="[/love]" id="qqface_90"></a><a title="[/<L>]" id="qqface_91"></a><a title="[/jump]" id="qqface_92"></a><a title="[/shake]" id="qqface_93"></a><a title="[/<O>]" id="qqface_94"></a><a title="[/circle]" id="qqface_95"></a><a title="[/kotow]" id="qqface_96"></a><a title="[/turn]" id="qqface_97"></a><a title="[/skip]" id="qqface_98"></a><a title="[/oY]" id="qqface_99"></a><a title="[/#-O]" id="qqface_100"></a><a title="[/hiphop]" id="qqface_101"></a><a title="[/kiss]" id="qqface_102"></a><a title="[/<&]" id="qqface_103"></a><a title="[/&>]" id="qqface_104"></a></div></div>';
		document.body.appendChild(ab);
		this._face_panel_ref = ab;
		this._tabsManage = new CHATTY.cls.TabsManage(this, {});
		this._taskBar = CHATTY.cls.Taskbar.getInstance();
		this._menu_tabs_el = c.get(this._id + "_menu_tabs");
		this._impression_of_my_el = c.get(this._id + "_impression_of_my");
		this._impression_of_buddy_el = c.get(this._id + "_impression_of_buddy");
		this._message_area_el = c.get(this._id + "_message_area");
		this._msg_box_tab_head_el = c.get(this._id + "_msg_box_tab_head");
		this._msg_box_el = c.get(this._id + "_msg_box");
		this._refresh_msg_box_button_el = c.get(this._id + "_refresh_msg_box_button");
		this._buddys_feeds_tab_head_el = c.get(this._id + "_buddys_feeds_tab_head");
		this._buddys_feeds_el = c.get(this._id + "_buddys_feeds");
		this._refresh_buddys_feeds_button_el = c.get(this._id + "_refresh_buddys_feeds_button");
		this._buddys_impressions_tab_head_el = c.get(this._id + "_buddys_impressions_tab_head");
		this._buddys_impressions_el = c.get(this._id + "_buddys_impressions");
		this._refresh_buddys_impressions_button_el = c.get(this._id + "_refresh_buddys_impressions_button");
		this._web_browser_tab_head_el = c.get(this._id + "_web_browser_tab_head");
		this._web_browser_el = c.get(this._id + "_web_browser");
		this._refresh_web_browser_button_el = c.get(this._id + "_refresh_web_browser_button");
		this._web_browser_iframe_el = c.get("web_browser_iframe");
		var u = this;
		e.on(this._web_browser_iframe_el, "load", function() {
			e.removeListener(window.frames.web_browser_iframe.document, "mouseup", u.hideRecommendList);
			e.on(window.frames.web_browser_iframe.document, "mouseup", u.hideRecommendList, u, true);
			e.removeListener(window.frames.web_browser_iframe.document, "keydown", u.mf_ShortKey);
			e.on(window.frames.web_browser_iframe.document, "keydown", u.mf_ShortKey, u, true);
			e.removeListener(window.frames.web_browser_iframe, "mouseup", u.hideRecommendList);
			e.on(window.frames.web_browser_iframe, "mouseup", u.hideRecommendList, u, true);
			e.removeListener(window.frames.web_browser_iframe, "keydown", u.mf_ShortKey);
			e.on(window.frames.web_browser_iframe, "keydown", u.mf_ShortKey, u, true)
		}, this, true);
		e.on(this._music_box_iframe_el, "load", function() {
			e.removeListener(window.frames.music_box_iframe.document, "keydown", u.mf_ShortKey);
			e.on(window.frames.music_box_iframe.document, "keydown", u.mf_ShortKey, u, true)
		}, this, true);
		this._web_browser_home_button_el = c.get("web_browser_home_button");
		this._web_browser_recommend_button_el = c.get("web_browser_recommend_button");
		this._webqq_top_el = c.get("webqq_top");
		this._taskbar_el = c.get("Taskbar_taskbar");
		this._web_browser_enter_button_el = c.get("web_browser_enter_button");
		this._web_browser_max_button_el = c.get("web_browser_max_button");
		this._web_browser_clear_button_el = c.get("web_browser_clear_button");
		this._web_browser_refresh_button_el = c.get("web_browser_refresh_button");
		this._web_browser_back_button_el = c.get("web_browser_back_button");
		this._web_browser_forward_button_el = c.get("web_browser_forward_button");
		this._web_browser_address_input_el = c.get("web_browser_address_input");
		this._music_box_tab_head_el = c.get(this._id + "_music_box_tab_head");
		this._music_box_el = c.get(this._id + "_music_box");
		this._refresh_music_box_button_el = c.get(this._id + "_refresh_music_box_button");
		this._music_box_iframe_el = c.get("music_box_iframe");
		this._setting_center_tab_head_el = c.get(this._id + "_setting_center_tab_head");
		this._setting_center_el = c.get(this._id + "_setting_center");
		this._close_setting_center_button_el = c.get(this._id + "_close_setting_center_button");
		this._setting_center_tabhead0_el = c.get("setting_center_tabhead0");
		this._setting_center_tabhead1_el = c.get("setting_center_tabhead1");
		this._setting_center_tabbody0_el = c.get("setting_center_tabbody0");
		this._setting_center_tabbody1_el = c.get("setting_center_tabbody1");
		this._msgbox_set_display_el = c.get("msgbox_set_display");
		this._msgbox_set_default_el = c.get("msgbox_set_default");
		this._buddy_state_set_display_el = c.get("buddy_state_set_display");
		this._buddy_state_set_default_el = c.get("buddy_state_set_default");
		this._impression_set_display_el = c.get("impression_set_display");
		this._impression_set_default_el = c.get("impression_set_default");
		this._musicbox_set_display_el = c.get("musicbox_set_display");
		this._musicbox_set_default_el = c.get("musicbox_set_default");
		this._web_browser_set_display_el = c.get("web_browser_set_display");
		this._web_browser_set_default_el = c.get("web_browser_set_default");
		this._setting_center_tabbody0_submit_el = c.get("setting_center_tabbody0_submit");
		this._setting_center_tabbody0_cancel_el = c.get("setting_center_tabbody0_cancel");
		this._buddy_details_tab_head_el = c.get(this._id + "_buddy_details_tab_head");
		this._buddy_details_el = c.get(this._id + "_buddy_details");
		this._close_buddy_details_button_el = c.get(this._id + "_close_buddy_details_button");
		this._buddy_manager_tab_head_el = c.get(this._id + "_buddy_manager_tab_head");
		this._buddy_manager_el = c.get(this._id + "_buddy_manager");
		this._buddy_manager_iframe_el = c.get("buddy_manager_iframe");
		this._close_buddy_manager_button_el = c.get(this._id + "_close_buddy_manager_button");
		this._finger_friend_tab_head_el = c.get(this._id + "_finger_friend_tab_head");
		this._finger_friend_el = c.get(this._id + "_finger_friend");
		this._close_finger_friend_button_el = c.get(this._id + "_close_finger_friend_button");
		this._chatlog_tab_head_el = c.get(this._id + "_chatlog_tab_head");
		this._chatlog_el = c.get(this._id + "_chatlog");
		this._close_chatlog_button_el = c.get(this._id + "_close_chatlog_button");
		e.on(this._refresh_msg_box_button_el, "click", this.mf_refreshMailMsg, this, true);
		e.on(this._refresh_buddys_feeds_button_el, "click", this.mf_refreshBuddyFeeds, this, true);
		e.on(this._close_finger_friend_button_el, "click", this.mf_clickCloseAddBuddyTab, this, true);
		e.on(this._close_buddy_details_button_el, "click", this.mf_clickCloseBuddyDetailsTab, this, true);
		e.on(this._close_buddy_manager_button_el, "click", this.mf_clickCloseBuddyManagerTab, this, true);
		e.on(this._close_chatlog_button_el, "click", this.mf_clickCloseChatlogTab, this, true);
		e.on(this._close_setting_center_button_el, "click", this.clickCloseSettingCenterTab, this, true);
		e.on(this._setting_center_tabbody0_submit_el, "click", this.clickSubmitSettingCenterTab, this, true);
		e.on(this._setting_center_tabbody0_cancel_el, "click", this.clickCloseSettingCenterTab, this, true);
		e.on(document.body, "click", function() {
			//pgv
		}, this, true);

		e.on(this._status_menu_button_node, "click", this.mf_clickStatusMenu, this, true);
		e.on(this._tabs_setting_el, "click", this.openSettingCenterTab, this, true);
		e.on(this._my_qqlevel_button_node, "click", this.mf_clickMyQQLevelButton, this, true);
		e.on(this._setting_menu_el, "click", this.mf_clickSettingMenu, this, true);
		e.on(this._message_area_el.parentNode, "click", this.mf_HideActWindow, this, true);
		e.on(this._taskBar._eleRef, "click", this.mf_HideActWindow, this, true);
		e.on(this._user_friend_el, "click", this.mf_FriendExpand, this, true);
		e.on(document, "keydown", this.mf_ShortKey, this, true);
		var N = window.frames;
		for ( var ak = 0; ak < N.length; ak++) {
			e.on(N[ak], "keydown", this.mf_ShortKey, this, true)
		}
		e.on(this._qq_lock_button_el, "click", this.handleClickToLockQQ, this, true);
		e.on(this._qqtitle_exit_el, "click", this.mf_CloseWindow, this, true);
		e.on(this._search_input_el, "keyup", this.mf_SearchFriend, this, true);
		e.on(this._search_input_el, "mouseout", this.mf_SearchInputMouseOut, this, true);
		e.on(this._search_button_el, "click", this.mf_OpenFriend, this, true);
		e.on(this._search_input_el, "focus", function() {
			if (String(this.value).replace(/(^\s|\s$)/gi, "") == "搜索用户或群组") {
				this.value = ""
			}
		});
		e.on(this._search_input_el, "blur", function() {
			if (String(this.value).replace(/(^\s|\s$)/gi, "") == "") {
				this.value = "搜索用户或群组"
			}
		});
		e.on(this._mail_msg_re_el, "click", this.mf_refreshMailMsg, this, true);
		e.on(this._mail_msg_re_el, "focus", function() {
			this.blur()
		});
		e.on(this._friend_offmsg_ex_el, "click", this.mf_ExpandFriendOffMsg, this, true);
		e.on(this._friend_offmsg_ex_el, "focus", function() {
			this.blur()
		});
		e.on(this._class_offmsg_ex_el, "click", this.mf_ExpandClassOffMsg, this, true);
		e.on(this._class_offmsg_ex_el, "focus", function() {
			this.blur()
		});
		e.on(this._mail_msg_ex_el, "click", this.mf_ExpandMailMsg, this, true);
		e.on(this._mail_msg_ex_el, "focus", function() {
			this.blur()
		});
		e.on(this._sysmsg_ex_el, "click", this.mf_ExpandSysMsg, this, true);
		e.on(this._sysmsg_ex_el, "focus", function() {
			this.blur()
		});
		e.on(this._qzoneBlog_close_el, "click", this.mf_close_qzoneBlog, this, true);
		e.on(this._web_browser_back_button_el, "click", this.clickWebBrowserBackButton, this, true);
		e.on(this._web_browser_forward_button_el, "click", this.clickWebBrowserForwardButton, this, true);
		e.on(this._web_browser_refresh_button_el, "click", this.clickWebBrowserRefreshButton, this, true);
		e.on(this._web_browser_home_button_el, "click", this.clickWebBrowserHomeButton, this, true);
		e.on(this._web_browser_recommend_button_el, "click", this.clickWebBrowserRecommendButton, this, true);
		e.on(this._web_browser_enter_button_el, "click", this.clickWebBrowserEnterButton, this, true);
		e.on(this._web_browser_max_button_el, "click", this.clickWebBrowserMaxButton, this, true);
		e.on(this._web_browser_clear_button_el, "click", this.clickWebBrowserClearButton, this, true);
		e.on(this._refresh_web_browser_button_el, "click", this.clickWebBrowserEnterButton, this, true);
		e.on(this._web_browser_address_input_el, "click", this.clickWebBrowserAddressInput, this, true);
		e.on(this._web_browser_address_input_el, "blur", this.blurWebBrowserAddressInput, this, true);
		e.on(this._web_browser_address_input_el, "keydown", this.keydownWebBrowserAddressInput, this, true);
		e.on(this._refresh_music_box_button_el, "click", this.clickMusicBoxRefreshButton, this, true);
		this.messageMarquee = new CHATTY.cls.Marquee( {
			speed : 30,
			stopTime : 3000,
			lineHeight : 24,
			isScrollOneLine : false,
			div : c.get("Main_mainwindow_message_marquee"),
			div1 : c.get("Main_mainwindow_message_marquee_inner")
		});
		this.messageMarquee.init();
		c.setStyle(this._class_list_el, "display", "none");
		c.setStyle(this._cancel_signature_el, "display", "none");
		for ( var ak = 0; ak < 105; ak++) {
			var j = c.get("qqface_" + ak);
			e.on(j, "mousedown", this.mf_InsertFace, this, true)
		}
		this._search_panel_obj = new YAHOO.widget.Overlay(this._search_panel_ref, {
			visible : false,
			context : [ null, "bl", "tl" ]
		});
		this._search_panel_obj.render();
		this._private_info_panel_obj = new YAHOO.widget.Overlay(this._private_info_panel_ref, {
			iframe : false,
			visible : false,
			context : [ null, "bl", "tl" ]
		});
		this._private_info_panel_obj.render();
		e.on(window.document, "mouseover", function(av, i) {
			var aw = e.getTarget(av);
			if (c.isAncestor(i._private_info_panel_ref, aw) || (c.isAncestor(i._user_list_el, aw) && aw.className != "names") || (i._user_list_el == aw) || (i._private_info_panel_ref == aw)) {
				return
			}
			i.buddyOptionTabInTips.cancelSelected();
			i._private_info_panel_ref.style.display = "none";
			i._private_info_panel_obj.hide()
		}, this);
		this._sset_panel_obj = new YAHOO.widget.Overlay(this._sset_panel_ref, {
			visible : false,
			context : [ null, "bl", "tl" ]
		});
		this._sset_panel_obj.render();
		e.on(this._status_menu_panel_node.childNodes[0], "mousedown", this._qqclient.changeStat2Online, this._qqclient, true);
		e.on(this._status_menu_panel_node.childNodes[1], "mousedown", this._qqclient.changeStat2Away, this._qqclient, true);
		e.on(this._status_menu_panel_node.childNodes[2], "mousedown", this._qqclient.changeStat2Invisible, this._qqclient, true);
		e.on(this._status_menu_panel_node.childNodes[3], "mousedown", this._qqclient.changeStat2Offline, this._qqclient, true);
		e.on(this._status_menu_panel_node.childNodes[4], "mousedown", this.mf_CloseWindow, this, true);
		e.on(this._setting_menu_panel_node.childNodes[0], "mousedown", this.mf_OpenVoice, this, true);
		e.on(this._setting_menu_panel_node.childNodes[1], "mousedown", this.mf_CloseVoice, this, true);
		e.on(this._setting_menu_panel_node.childNodes[2], "mousedown", this.mf_StopAllMsg, this, true);
		this.isClickWebBrowserTabFirst = 0;
		this.isClickMusicBoxTabFirst = 0;
		this.isFocus = false;
		this.mainTab = new CHATTY.cls.Tab();
		if (this._qqclient.getBitValue(14, 1) == 0 || true) {
			this.mainTab.add( {
				trigger : this._msg_box_tab_head_el,
				sheet : this._msg_box_el
			});
			this._msgbox_set_display_el.checked = true;
			//pgv
		} else {
			//pgv
		}

		if (this._qqclient.getBitValue(15, 1) == 0) {
			this.mainTab.add( {
				trigger : this._buddys_feeds_tab_head_el,
				sheet : this._buddys_feeds_el
			});
			this._buddy_state_set_display_el.checked = true;
			
		} else {
			//pgv
		}
		if (this._qqclient.getBitValue(16, 1) == 0) {
			this.mainTab.add( {
				trigger : this._buddys_impressions_tab_head_el,
				sheet : this._buddys_impressions_el
			});
			this._impression_set_display_el.checked = true;
		} else {
			//pgv
		}
		if (this._qqclient.getBitValue(17, 1) == 0) {
			if (window.ActiveXObject) {
				var V = c.get("musicbox_setting_item");
				if (V) {
					V.style.display = "inline"
				}
				this.mainTab.add( {
					trigger : this._music_box_tab_head_el,
					sheet : this._music_box_el
				});
				this._musicbox_set_display_el.checked = true;
			}
		} else {
			//pgv
		}
		if (this._qqclient.getBitValue(18, 1) == 0) {
			this.mainTab.add( {
				trigger : this._web_browser_tab_head_el,
				sheet : this._web_browser_el
			});
			this._web_browser_set_display_el.checked = true;
		} else {
			//pgv
		}
		this._urlTips = this._web_browser_address_input_el.value;
		this.mainTab.config.triggerEvent = "click";
		this.mainTab.config.slideEnabled = false;
		this.mainTab.onShow.subscribe(function(av, i) {
			var aw = CHATTY.obj.QQClient.mainPanel;
			switch (i[0].trigger) {
			case aw._msg_box_tab_head_el:
				document.title = "消息盒子 - " + aw._qqclient.uin;
				break;
			case aw._buddys_feeds_tab_head_el:
				document.title = "好友近况 - " + aw._qqclient.uin;
				break;
			case aw._buddys_impressions_tab_head_el:
				document.title = "好友印象 - " + aw._qqclient.uin;
				break;
			case aw._music_box_tab_head_el:
				document.title = "QQ 音乐 - " + aw._qqclient.uin;
				if (aw.isClickMusicBoxTabFirst === 0) {
					aw.openUrlInMusicBox();
					aw.isClickMusicBoxTabFirst = 1
				}
				break;
			case aw._web_browser_tab_head_el:
				document.title = "浏览网页 - " + aw._qqclient.uin;
				if (aw.isClickWebBrowserTabFirst === 0) {
					aw.openBrowserHome();
					aw.isClickWebBrowserTabFirst = 1
				}
				break;
			case aw._buddy_details_tab_head_el:
				document.title = "详细资料 - " + aw._qqclient.uin;
				break;
			case aw._buddy_manager_tab_head_el:
				document.title = "管理好友 - " + aw._qqclient.uin;
				break;
			case aw._finger_friend_tab_head_el:
				document.title = "添加好友 - " + aw._qqclient.uin;
				break;
			default:
				break
			}
		});
		this.mainTab.init();
		this.addBuddy = CHATTY.cls.AddBuddy.getInstance();
		e.on(this._AddBuddyButtonInTips_node, "click", this.addBuddy.clickAddBuddyButton, this.addBuddy);
		this.settingCenterTabs = new CHATTY.cls.Tab();
		this.settingCenterTabs.add( {
			trigger : this._setting_center_tabhead0_el,
			sheet : this._setting_center_tabbody0_el
		});
		this.settingCenterTabs.config.triggerEvent = "click";
		this.settingCenterTabs.config.slideEnabled = false;
		this.settingCenterTabs.init();
	};
	CHATTY.cls.MainPanel.getInstance = function() {
		if (!CHATTY.cls.MainPanel.prototype.instance) {
			CHATTY.cls.MainPanel.prototype.instance = new CHATTY.cls.MainPanel("mainwindow")
		}
		return CHATTY.cls.MainPanel.prototype.instance
	};
	CHATTY.cls.MainPanel.Destroy = function() {
		if (CHATTY.cls.MainPanel.prototype.instance) {
			CHATTY.cls.MainPanel.prototype.instance.destroy();
			CHATTY.cls.MainPanel.prototype.instance = null
		}
	};
	CHATTY.cls.MainPanel.prototype = {
		showMoreWeatherBoard : function() {
			var f = c.getXY(this._weather_button_el);
			window.clearTimeout(this._weatherTimer);
			c.setStyle(this._more_weather_board_el, (f[0] - 250) + "left", "px");
			c.setStyle(this._more_weather_board_el, f[1] + "top", "px");
			c.setStyle(this._more_weather_board_el, "display", "block")
		},
		hideMoreWeatherBoard : function() {
			var f = this;
			this._weatherTimer = window.setTimeout(function() {
				c.setStyle(f._more_weather_board_el, "display", "none")
			}, 500)
		},
		mf_resetDocumentTitle : function() {
			switch (this.mainTab.currentTab.trigger) {
			case this._msg_box_tab_head_el:
				document.title = "消息盒子 - " + this._qqclient.uin;
				break;
			case this._buddys_feeds_tab_head_el:
				document.title = "好友近况 - " + this._qqclient.uin;
				break;
			case this._buddys_impressions_tab_head_el:
				document.title = "好友印象 - " + this._qqclient.uin;
				break;
			case this._buddy_details_tab_head_el:
				document.title = "详细资料 - " + this._qqclient.uin;
				break;
			case this._buddy_manager_tab_head_el:
				document.title = "管理好友 - " + this._qqclient.uin;
				break;
			case this._music_box_tab_head_el:
				document.title = "QQ 音乐 - " + this._qqclient.uin;
				break;
			case this._web_browser_tab_head_el:
				document.title = "浏览网页 - " + this._qqclient.uin;
				break;
			case this._finger_friend_tab_head_el:
				document.title = "添加好友 - " + this._qqclient.uin;
				break;
			default:
				break
			}
		},
		handleLoadWeather : function(f) {
			f = f.split(";");
			this._CityAndTemperature_el.innerHTML = f[0] + "&nbsp;" + f[1] + "~" + f[2];
			this._WeatherPic_el.src = f[3]
		},
		openMsgboxTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._msg_box_tab_head_el,
				sheet : this._msg_box_el
			});
			if (f == -1) {
				this.addMsgboxTab()
			} else {
				this.selectMsgboxTab()
			}
		},
		addMsgboxTab : function() {
			this.mainTab.add( {
				trigger : this._msg_box_tab_head_el,
				sheet : this._msg_box_el
			});
			this.mainTab.init();
			this.selectMsgboxTab()
		},
		removeMsgboxTab : function() {
			this.mainTab.remove( {
				trigger : this._msg_box_tab_head_el,
				sheet : this._msg_box_el
			})
		},
		selectMsgboxTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._msg_box_tab_head_el,
				sheet : this._msg_box_el
			});
			if (f != -1) {
				this.mainTab.select( {
					trigger : this._msg_box_tab_head_el,
					sheet : this._msg_box_el
				})
			}
		},
		openBuddyStateTab : function() {
			alert("openBuddyStateTab");
		},
		addBuddyStateTab : function() {
			alert("addBuddyStateTab");
		},
		removeBuddyStateTab : function() {
			alert("removeBuddyStateTab");
		},
		selectBuddyStateTab : function() {
			alert("selectBuddyStateTab");
		},
		openImpressionTab : function() {
			alert("openImpressionTab");
		},
		addImpressionTab : function() {
			this.mainTab.add( {
				trigger : this._buddys_impressions_tab_head_el,
				sheet : this._buddys_impressions_el
			});
			this.mainTab.init();
			this.selectImpressionTab()
		},
		removeImpressionTab : function() {
			this.mainTab.remove( {
				trigger : this._buddys_impressions_tab_head_el,
				sheet : this._buddys_impressions_el
			})
		},
		selectImpressionTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._buddys_impressions_tab_head_el,
				sheet : this._buddys_impressions_el
			});
			if (f != -1) {
				this.mainTab.select( {
					trigger : this._buddys_impressions_tab_head_el,
					sheet : this._buddys_impressions_el
				})
			}
		},
		openMusicBoxTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._music_box_tab_head_el,
				sheet : this._music_box_el
			});
			if (f == -1) {
				this.addMusicBoxTab()
			} else {
				this.selectMusicBoxTab()
			}
		},
		addMusicBoxTab : function() {
			this.mainTab.add( {
				trigger : this._music_box_tab_head_el,
				sheet : this._music_box_el
			});
			this.mainTab.init();
			this.selectMusicBoxTab()
		},
		removeMusicBoxTab : function() {
			this.openUrlInMusicBox("about:blank");
			this.mainTab.remove( {
				trigger : this._music_box_tab_head_el,
				sheet : this._music_box_el
			})
		},
		selectMusicBoxTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._music_box_tab_head_el,
				sheet : this._music_box_el
			});
			if (f != -1) {
				this.mainTab.select( {
					trigger : this._music_box_tab_head_el,
					sheet : this._music_box_el
				})
			}
		},
		openWebBrowserTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._web_browser_tab_head_el,
				sheet : this._web_browser_el
			});
			if (f == -1) {
				this.addWebBrowserTab()
			} else {
				this.selectWebBrowserTab()
			}
		},
		addWebBrowserTab : function() {
			this.mainTab.add( {
				trigger : this._web_browser_tab_head_el,
				sheet : this._web_browser_el
			});
			this.mainTab.init();
			this.selectWebBrowserTab()
		},
		removeWebBrowserTab : function() {
			this.openUrlInWebBrowser("about:blank");
			this.mainTab.remove( {
				trigger : this._web_browser_tab_head_el,
				sheet : this._web_browser_el
			})
		},
		selectWebBrowserTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._web_browser_tab_head_el,
				sheet : this._web_browser_el
			});
			if (f != -1) {
				this.mainTab.select( {
					trigger : this._web_browser_tab_head_el,
					sheet : this._web_browser_el
				})
			}
		},
		openSettingCenterTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._setting_center_tab_head_el,
				sheet : this._setting_center_el
			});
			if (f == -1) {
				this.addSettingCenterTab()
			} else {
				this.selectSettingCenterTab()
			}
		},
		addSettingCenterTab : function() {
			this.mainTab.add( {
				trigger : this._setting_center_tab_head_el,
				sheet : this._setting_center_el
			});
			this.mainTab.init();
			this.selectSettingCenterTab()
		},
		removeSettingCenterTab : function() {
			this.mainTab.remove( {
				trigger : this._setting_center_tab_head_el,
				sheet : this._setting_center_el
			})
		},
		selectSettingCenterTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._setting_center_tab_head_el,
				sheet : this._setting_center_el
			});
			if (f != -1) {
				this.mainTab.select( {
					trigger : this._setting_center_tab_head_el,
					sheet : this._setting_center_el
				})
			}
		},
		clickSubmitSettingCenterTab : function(f) {
			e.stopEvent(f);
			if (this._msgbox_set_default_el.checked) {
				if (!this._msgbox_set_display_el.checked) {
					alert("[消息盒子]未被选为可见栏目,不能设置为默认栏目!");
					return
				}
				this.mf_SetTabPos(0)
			}
			if (this._buddy_state_set_default_el.checked) {
				if (!this._buddy_state_set_display_el.checked) {
					alert("[好友近况]未被选为可见栏目,不能设置为默认栏目!");
					return
				}
				this.mf_SetTabPos(1)
			}
			if (this._impression_set_default_el.checked) {
				if (!this._impression_set_display_el.checked) {
					alert("[好友印象]未被选为可见栏目,不能设置为默认栏目!");
					return
				}
				this.mf_SetTabPos(2)
			}
			if (this._musicbox_set_default_el.checked) {
				if (!this._musicbox_set_display_el.checked) {
					alert("[QQ音乐]未被选为可见栏目,不能设置为默认栏目!");
					return
				}
				this.mf_SetTabPos(3)
			}
			if (this._web_browser_set_default_el.checked) {
				if (!this._web_browser_set_display_el.checked) {
					alert("[浏览网页]未被选为可见栏目,不能设置为默认栏目!");
					return
				}
				this.mf_SetTabPos(4)
			}
			if (this._msgbox_set_display_el.checked) {
				this._qqclient.setBitValue(14, 1, 0);
				this.addMsgboxTab();
			} else {
				this._qqclient.setBitValue(14, 1, 1);
				this.removeMsgboxTab();
			}
			if (this._buddy_state_set_display_el.checked) {
				this._qqclient.setBitValue(15, 1, 0);
				this.addBuddyStateTab();
			} else {
				this._qqclient.setBitValue(15, 1, 1);
				this.removeBuddyStateTab();
			}
			if (this._impression_set_display_el.checked) {
				this._qqclient.setBitValue(16, 1, 0);
				this.addImpressionTab();
			} else {
				this._qqclient.setBitValue(16, 1, 1);
				this.removeImpressionTab();
			}
			if (this._musicbox_set_display_el.checked) {
				this._qqclient.setBitValue(17, 1, 0);
				this.addMusicBoxTab();
			} else {
				this._qqclient.setBitValue(17, 1, 1);
				this.removeMusicBoxTab();
			}
			if (this._web_browser_set_display_el.checked) {
				this._qqclient.setBitValue(18, 1, 0);
				this.addWebBrowserTab();
			} else {
				this.openUrlInWebBrowser();
				this._qqclient.setBitValue(18, 1, 1);
				this.removeWebBrowserTab();
			}
			this.removeSettingCenterTab()
		},
		clickCloseSettingCenterTab : function(f) {
			e.stopEvent(f);
			this.removeSettingCenterTab()
		},
		mf_openAddBuddyTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._finger_friend_tab_head_el,
				sheet : this._finger_friend_el
			});
			if (f == -1) {
				this.mf_addAddBuddyTab()
			} else {
				this.mf_selectAddBuddyTab()
			}
			var g = this;
			window.setTimeout(function() {
				g.addBuddy.searchModeTabs.select( {
					trigger : g.addBuddy._search_buddy_by_account_tabhead_node,
					sheet : g.addBuddy._search_buddy_by_account_node
				})
			}, 0);
		},
		mf_addAddBuddyTab : function() {
			this.mainTab.add( {
				trigger : this._finger_friend_tab_head_el,
				sheet : this._finger_friend_el
			});
			this.mainTab.init();
			this.mf_selectAddBuddyTab()
		},
		mf_removeAddBuddyTab : function() {
			this.mainTab.remove( {
				trigger : this._finger_friend_tab_head_el,
				sheet : this._finger_friend_el
			})
		},
		mf_selectAddBuddyTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._finger_friend_tab_head_el,
				sheet : this._finger_friend_el
			});
			if (f != -1) {
				this.mainTab.select( {
					trigger : this._finger_friend_tab_head_el,
					sheet : this._finger_friend_el
				})
			}
		},
		mf_clickCloseAddBuddyTab : function(f) {
			e.stopEvent(f);
			this.mf_removeAddBuddyTab()
		},
		clickWebBrowserBackButton : function(f) {
			this.backWebBrowser()
		},
		clickWebBrowserForwardButton : function(f) {
			this.forwardWebBrowser()
		},
		clickWebBrowserRefreshButton : function(f) {
			this.refreshWebBrowser()
		},
		clickWebBrowserEnterButton : function(g) {
			var f = (this._web_browser_address_input_el.value);
			this.openUrlInWebBrowser(f)
		},
		clickWebBrowserRecommendButton : function(f) {
			e.stopEvent(f);
			this.showRecommendList(f)
		},
		showRecommendList : function() {
			var f = c.getXY(this._web_browser_recommend_button_el);
			c.setStyle(this._recommend_list_el, "left", f[0] + "px");
			c.setStyle(this._recommend_list_el, "top", f[1] + 24 + "px");
			c.setStyle(this._recommend_list_el, "display", "block");
			e.on(document.body, "mouseup", this.hideRecommendList, this, true)
		},
		hideRecommendList : function() {
			e.removeListener(document.body, "mouseup", this.hideRecommendList);
			c.setStyle(this._recommend_list_el, "display", "none")
		},
		clickWebBrowserMaxButton : function(f) {
			this.maxMainpanel()
		},
		clickWebBrowserRestorexButton : function(f) {
			this.restoreMainpanel()
		},
		switchMainpanelMax : function() {
			if (this.isMainpanelMax === true) {
				this.restoreMainpanel()
			} else {
				this.maxMainpanel()
			}
		},
		maxMainpanel : function() {
			this.isMainpanelMax = true;
			e.removeListener(this._web_browser_max_button_el, "click", this.clickWebBrowserMaxButton);
			c.replaceClass(this._web_browser_max_button_el, "max_button", "restore_button");
			this._web_browser_max_button_el.title = "还原(快捷键：Alt + W)";
			this.hideBuddyList();
			this.hideWebQQTop();
			this.hideTaskBar();
			this._taskBar.mf_handleOnResize();
			this._taskBar.setMagnetOff();
			e.on(this._web_browser_max_button_el, "click", this.clickWebBrowserRestorexButton, this, true)
		},
		restoreMainpanel : function() {
			this.isMainpanelMax = false;
			e.removeListener(this._web_browser_max_button_el, "click", this.clickWebBrowserRestorexButton);
			c.replaceClass(this._web_browser_max_button_el, "restore_button", "max_button");
			this._web_browser_max_button_el.title = "最大化(快捷键：Alt + W)";
			this.showBuddyList();
			this.showWebQQTop();
			this.showTaskBar();
			this._taskBar.mf_handleOnResize();
			e.on(this._web_browser_max_button_el, "click", this.clickWebBrowserMaxButton, this, true)
		},
		showWebQQTop : function() {
			c.setStyle(this._webqq_top_el, "display", "block");
			this._webqqTopHeight = 63
		},
		hideWebQQTop : function() {
			c.setStyle(this._webqq_top_el, "display", "none");
			this._webqqTopHeight = 0
		},
		showBuddyList : function() {
			c.setStyle(this._buddy_list_panel_el, "display", "block");
			this._buddyListPanelWidth = 220;
			c.setStyle(this._main_leftpanel_el, "marginRight", this._buddyListPanelWidth + 13 + "px")
		},
		hideBuddyList : function() {
			c.setStyle(this._buddy_list_panel_el, "display", "none");
			this._buddyListPanelWidth = 0;
			c.setStyle(this._main_leftpanel_el, "marginRight", this._buddyListPanelWidth + 13 + "px")
		},
		showTaskBar : function() {
			c.setStyle(this._taskbar_el, "display", "block");
			this._taskbarHeight = 53
		},
		hideTaskBar : function() {
			c.setStyle(this._taskbar_el, "display", "none");
			this._taskbarHeight = -16
		},
		clickWebBrowserClearButton : function(f) {
			this.openUrlInWebBrowser()
		},
		clickWebBrowserHomeButton : function(f) {
			this.openBrowserHome()
		},
		clickWebBrowserAddressInput : function(f) {
			if (!this.isFocus) {
				this.isFocus = true;
				if (this._web_browser_address_input_el.value == this._urlTips) {
					this._web_browser_address_input_el.value = ""
				} else {
					this._web_browser_address_input_el.select()
				}
			}
		},
		blurWebBrowserAddressInput : function(f) {
			this.isFocus = false;
			if (this._web_browser_address_input_el.value == "") {
				this._web_browser_address_input_el.value = this._urlTips
			}
		},
		keydownWebBrowserAddressInput : function(h) {
			var f = e.getCharCode(h) || 0;
			if (f == 13) {
				var g = (this._web_browser_address_input_el.value);
				this.openUrlInWebBrowser(g)
			}
		},
		handleWithInputAddress : function(j) {
			var g = j.trim(), f = /(^[a-zA-Z0-9]+[^.]):/, k = /^[\S.]+\.[\S.]+$/, i = /[\w.]+\/(\S*)/, h = /;$/;
			if ((!f.test(g)) && (!k.test(g))) {
				g = "http://soso.qq.com/q?bid=203&cid=webq.a&ie=utf-8&w=" + encodeURIComponent(g)
			} else {
				if (!f.test(g)) {
					g = "http://" + g
				}
				if (!i.test(g)) {
					g = g + "/"
				}
			}
			return g
		},
		openThisLinkInWebBrowser : function(f) {
			this.openWebBrowserTab();
			this.openUrlInWebBrowser(f.href)
		},
		openUrlInWebBrowser : function(g) {
			if (g) {
				if (g !== "about:blank") {
					g = this.handleWithInputAddress(g)
				}
				g = g || "web_browser_home.html"
			} else {
				g = "web_browser_home.html"
			}
			if (g == "web_browser_home.html") {
				this._web_browser_address_input_el.value = this._urlTips
			} else {
				this._web_browser_address_input_el.value = g
			}
			this._web_browser_iframe_el.src = g;
			var f = this;
			window.setTimeout(function() {
				e.removeListener(window.frames.web_browser_iframe, "keydown", f.mf_ShortKey, f);
				e.on(window.frames.web_browser_iframe, "keydown", f.mf_ShortKey, f, true)
			}, 1500);
			this._qqclient.reportBrowserRecord(this._qqclient.uin, g)
		},
		openBrowserHome : function() {
			var f = ssn("webbrowser_home");
			this.openUrlInWebBrowser(f)
		},
		runJsInWebBrowser : function(f) {
			f = f || "alert(null)";
			this._web_browser_iframe_el.src = "javascript:" + f + ";";
			this._qqclient.reportBrowserRecord(this._qqclient.uin, url)
		},
		refreshWebBrowser : function() {
			var f = this._web_browser_iframe_el.src;
			window.open(f, "web_browser_iframe")
		},
		backWebBrowser : function() {
			window.history.back()
		},
		forwardWebBrowser : function() {
			window.history.forward()
		},
		clickMusicBoxRefreshButton : function(f) {
			this.openUrlInMusicBox()
		},
		openUrlInMusicBox : function(g) {
			var f;
			if (window.ActiveXObject) {
				f = "http://music.qq.com/musicbox/player/music_player_webqq.html"
			} else {
				f = "http://music.soso.com/m.q?ty=box&sc=mus&ch=i.home.al.play&pid=i.home.play&append=0"
			}
			g = g || f;
			this._music_box_iframe_el.src = g
		},
		clickMyAvatarIconHandler : function(f) {
			e.stopEvent(f);
			this.showMyDetailsTab()
		},
		showMyDetailsTab : function(f) {
			this.mf_openBuddyDetailsTab();
			this.loadMyDetails()
		},
		showModifyMyDetails : function(f) {
			this.mf_openBuddyDetailsTab();
			this.loadMyDetailsToModify()
		},
		mf_openBuddyDetailsTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._buddy_details_tab_head_el,
				sheet : this._buddy_details_el
			});
			if (f == -1) {
				this.mf_addBuddyDetailsTab()
			} else {
				this.mf_selectBuddyDetailsTab()
			}
		},
		mf_addBuddyDetailsTab : function() {
			this.mainTab.add( {
				trigger : this._buddy_details_tab_head_el,
				sheet : this._buddy_details_el
			});
			this.mainTab.init();
			this.mf_selectBuddyDetailsTab()
		},
		mf_removeBuddyDetailsTab : function() {
			this.mainTab.remove( {
				trigger : this._buddy_details_tab_head_el,
				sheet : this._buddy_details_el
			})
		},
		mf_selectBuddyDetailsTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._buddy_details_tab_head_el,
				sheet : this._buddy_details_el
			});
			if (f != -1) {
				this.mainTab.select( {
					trigger : this._buddy_details_tab_head_el,
					sheet : this._buddy_details_el
				})
			}
		},
		mf_clickCloseBuddyDetailsTab : function(f) {
			e.stopEvent(f);
			this.mf_removeBuddyDetailsTab()
		},
		mf_openBuddyManagerTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._buddy_manager_tab_head_el,
				sheet : this._buddy_manager_el
			});
			if (f == -1) {
				this.mf_addBuddyManagerTab()
			} else {
				this.mf_selectBuddyManagerTab()
			}
			var g = "http://myqq1.qq.com/";
			g = "./myqq/buddy_manager.shtml";
			this._buddy_manager_iframe_el.src = g
		},
		mf_addBuddyManagerTab : function() {
			this.mainTab.add( {
				trigger : this._buddy_manager_tab_head_el,
				sheet : this._buddy_manager_el
			});
			this.mainTab.init();
			this.mf_selectBuddyManagerTab()
		},
		mf_removeBuddyManagerTab : function() {
			this.mainTab.remove( {
				trigger : this._buddy_manager_tab_head_el,
				sheet : this._buddy_manager_el
			})
		},
		mf_selectBuddyManagerTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._buddy_manager_tab_head_el,
				sheet : this._buddy_manager_el
			});
			if (f != -1) {
				this.mainTab.select( {
					trigger : this._buddy_manager_tab_head_el,
					sheet : this._buddy_manager_el
				})
			}
		},
		mf_clickCloseBuddyManagerTab : function(f) {
			e.stopEvent(f);
			this.mf_removeBuddyManagerTab()
		},
		openChatlogTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._chatlog_tab_head_el,
				sheet : this._chatlog_el
			});
			if (f == -1) {
				this.addChatlogTab()
			} else {
				this.selectChatlogTab()
			}
		},
		addChatlogTab : function() {
			this.mainTab.add( {
				trigger : this._chatlog_tab_head_el,
				sheet : this._chatlog_el
			});
			this.mainTab.init();
			this.selectChatlogTab()
		},
		removeChatlogTab : function() {
			this.mainTab.remove( {
				trigger : this._chatlog_tab_head_el,
				sheet : this._chatlog_el
			})
		},
		selectChatlogTab : function() {
			var f = this.mainTab.indexOf( {
				trigger : this._chatlog_tab_head_el,
				sheet : this._chatlog_el
			});
			if (f != -1) {
				this.mainTab.select( {
					trigger : this._chatlog_tab_head_el,
					sheet : this._chatlog_el
				})
			}
		},
		mf_clickCloseChatlogTab : function(f) {
			e.stopEvent(f);
			this.removeChatlogTab()
		},
		setBuddyDetails : function(f) {
			if (f.uin == this._qqclient.uin) {
				this._buddyDetails_realname_container1_node.style.display = "none";
				this._buddyDetails_view_button_node.style.display = "block";
				this._buddyDetails_modify_ok_button_node.style.display = "block"
			} else {
				this._buddyDetails_view_button_node.style.display = "none";
				this._buddyDetails_modify_ok_button_node.style.display = "none";
				if (this._qqclient.isFriend(f.uin) !== -1) {
					this._buddyDetails_realname_container1_node.style.display = "block"
				} else {
					this._buddyDetails_realname_container1_node.style.display = "none"
				}
				this._buddyDetails_realname_node.innerHTML = this._qqclient.bdylist.allUsers[f.uin].remark || "-";
				this._buddyDetails_realname_node.setAttribute("realname", this._qqclient.bdylist.allUsers[f.uin].remark);
				this._buddyDetails_realname_node.setAttribute("uin", f.uin)
			}
			this._buddy_details_loadend_node.scrollTop = 0;
			this._buddyDetails_avatar_node.src = face_server_domain + "/images/buddy-48x48.png";
			this._buddyDetails_nickname_node.innerHTML = f.nickName.toHtml();
			this._buddyDetails_nickname_2_node.innerHTML = f.nickName.toHtml();
			this._buddyDetails_tab_head_node.innerHTML = f.nickName.toHtml();
			this._buddyDetails_uin_node.innerHTML = f.uin;
			var g = this.getSmartUserArea(f);
			this._buddyDetails_city2_node.innerHTML = g;
			if (g == "" || g == "-") {
				this._buddyDetails_city2_node.title = "未填写地区"
			} else {
				this._buddyDetails_city2_node.title = ""
			}
			if (f.sex.toHtml() == "" || f.sex.toHtml() == "-") {
				this._buddyDetails_sex_node.innerHTML = "-";
				this._buddyDetails_sex_node.title = "未填写性别"
			} else {
				this._buddyDetails_sex_node.innerHTML = f.sex.toHtml();
				this._buddyDetails_sex_node.title = ""
			}
			if (f.age.toHtml() == "" || f.age.toHtml() == "-") {
				this._buddyDetails_age_node.innerHTML = "-";
				this._buddyDetails_age_node.title = "未填写年龄"
			} else {
				this._buddyDetails_age_node.innerHTML = f.age.toHtml() + "岁";
				this._buddyDetails_age_node.title = ""
			}
			this._buddyDetails_bloodtype_node.innerHTML = f.bloodType.toHtml();
			this._buddyDetails_shengxiao_node.innerHTML = f.shengXiao.toHtml();
			this._buddyDetails_constellation_node.innerHTML = f.constellation.toHtml();
			this._buddyDetails_country_node.innerHTML = f.country.toHtml();
			this._buddyDetails_province_node.innerHTML = f.province.toHtml();
			this._buddyDetails_city_node.innerHTML = f.cityNo.toHtml();
			this._buddyDetails_mobile_node.innerHTML = f.mobile.toHtml();
			this._buddyDetails_phone_node.innerHTML = f.phone.toHtml();
			this._buddyDetails_email_node.innerHTML = f.email.toHtml();
			this._buddyDetails_occupation_node.innerHTML = f.occupation.toHtml();
			this._buddyDetails_college_node.innerHTML = f.college.toHtml();
			this._buddyDetails_homepage_node.innerHTML = f.homepageLink;
			this._buddyDetails_ps_node.innerHTML = f.perInfo.toHtml();
			this._buddyDetails_buddy_qzone_node.innerHTML = '<a href="' + qzone_user_server_domain + "/" + f.uin + '" target="_blank" title="去' + f.nickName.toHtml() + '的Qzone空间看看...">'
					+ f.nickName.toHtml() + "的QQ空间</a>"
		},
		getSmartUserArea : function(f) {
			var g = f.cityNo.toHtml();
			if (g == "" || g == "-") {
				g = f.province.toHtml();
				if (g == "" || g == "-") {
					g = f.country.toHtml()
				}
			}
			return g
		},
		setMyDetailsToModify : function(m) {
			this._buddyDetails_view_button_node.style.display = "block";
			e.removeListener(this._buddyDetails_view_button_node, "click");
			e.on(this._buddyDetails_view_button_node, "click", this.mf_clickCloseBuddyDetailsTab, this, true);
			e.removeListener(this._buddyDetails_modify_ok_button_node, "click");
			e.on(this._buddyDetails_modify_ok_button_node, "click", this.clickModifyOkButtonHandler, this, true);
			this._buddyDetails_realname_container1_node.style.display = "none";
			this._buddy_details_loadend_node.scrollTop = 0;
			this._buddyDetails_avatar_node.src = face_server_domain + "/images/buddy-48x48.png";
			this._buddyDetails_nickname_node.innerHTML = '<input id="ModifyMyDetails_nickname_input_node" class="col3" type="text" value="' + (m.nickName.toHtml() == "-" ? "" : m.nickName.toHtml()) + '" />';
			this._buddyDetails_nickname_2_node.innerHTML = m.nickName.toHtml();
			this._buddyDetails_uin_node.innerHTML = m.uin;
			var j = '<select id="ModifyMyDetails_sex_input_node" class="col4">';
			for ( var g in this._qqclient.sex) {
				var h = "";
				if (this._qqclient.sex[g] == m.sex) {
					h = 'selected="selected"'
				}
				j += '<option value="' + this._qqclient.sex[g] + '" ' + h + " >" + this._qqclient.sex[g] + "</option>"
			}
			j += "</select>";
			this._buddyDetails_sex_node.innerHTML = j;
			this._buddyDetails_age_node.innerHTML = '<input id="ModifyMyDetails_age_input_node" class="col4" type="text" maxLength="3" value="' + (m.age == "-" ? "" : m.age) + '" />岁';
			var k = '<select id="ModifyMyDetails_bloodtype_input_node" class="col3">';
			for ( var g in this._qqclient.bloodType) {
				var h = "";
				if (this._qqclient.bloodType[g] == m.bloodType) {
					h = 'selected="selected"'
				}
				k += '<option value="' + g + '" ' + h + " >" + this._qqclient.bloodType[g] + "</option>"
			}
			k += "</select>";
			this._buddyDetails_bloodtype_node.innerHTML = k;
			var f = '<select id="ModifyMyDetails_shengxiao_input_node" class="col3">';
			for ( var g in this._qqclient.shengXiao) {
				var h = "";
				if (this._qqclient.shengXiao[g] == m.shengXiao) {
					h = 'selected="selected"'
				}
				f += '<option value="' + g + '" ' + h + " >" + this._qqclient.shengXiao[g] + "</option>"
			}
			f += "</select>";
			this._buddyDetails_shengxiao_node.innerHTML = f;
			var l = '<select id="ModifyMyDetails_constellation_input_node" class="col3">';
			for ( var g in this._qqclient.constellation) {
				var h = "";
				if (this._qqclient.constellation[g] == m.constellation) {
					h = 'selected="selected"'
				}
				l += '<option value="' + g + '" ' + h + " >" + this._qqclient.constellation[g] + "</option>"
			}
			l += "</select>";
			this._buddyDetails_constellation_node.innerHTML = l;
			this._buddyDetails_country_node.innerHTML = m.country;
			this._buddyDetails_province_node.innerHTML = m.province;
			this._buddyDetails_city_node.innerHTML = m.cityNo;
			var n = this.getSmartUserArea(m);
			this._buddyDetails_city2_node.innerHTML = (n == "") ? "-" : n;
			if (n == "" || n == "-") {
				this._buddyDetails_city2_node.title = "未填写地区"
			}
			this._buddyDetails_sex_node.title = "";
			this._buddyDetails_age_node.title = "";
			this._buddyDetails_mobile_node.innerHTML = '<input id="ModifyMyDetails_mobile_input_node" class="col2" type="text" maxLength="12" value="' + (m.mobile.toHtml() == "-" ? "" : m.mobile
					.toHtml()) + '" />';
			this._buddyDetails_phone_node.innerHTML = '<input id="ModifyMyDetails_phone_input_node" class="col2" type="text" maxLength="20" value="' + (m.phone.toHtml() == "-" ? "" : m.phone.toHtml()) + '" />';
			this._buddyDetails_email_node.innerHTML = '<input id="ModifyMyDetails_email_input_node" class="col2" type="text" maxLength="30" value="' + (m.email.toHtml() == "-" ? "" : m.email.toHtml()) + '" />';
			this._buddyDetails_occupation_node.innerHTML = '<input id="ModifyMyDetails_occupation_input_node" class="col2" type="text" value="' + (m.occupation.toHtml() == "-" ? "" : m.occupation
					.toHtml()) + '" />';
			this._buddyDetails_college_node.innerHTML = '<input id="ModifyMyDetails_college_input_node" class="col2" type="text" value="' + (m.college.toHtml() == "-" ? "" : m.college.toHtml()) + '" />';
			this._buddyDetails_homepage_node.innerHTML = '<input id="ModifyMyDetails_homepage_input_node" class="col2" type="text" maxLength="50" value="' + (m.homepage.toHtml() == "-" ? ""
					: m.homepage.toHtml()) + '" />';
			this._buddyDetails_ps_node.innerHTML = '<textarea id="ModifyMyDetails_ps_input_node" class="buddyDetails_ps">' + (m.perInfo.toTextareaHtml() == "-" ? "" : m.perInfo.toTextareaHtml())
					+ "</textarea>";
			e.on(c.get("ModifyMyDetails_mobile_input_node"), "keypress", this.checkNumberInput, this, true);
			e.on(c.get("ModifyMyDetails_phone_input_node"), "keypress", this.checkNumberInput, this, true);
			e.on(c.get("ModifyMyDetails_age_input_node"), "keypress", this.checkNumberInput, this, true);
			e.on(c.get("ModifyMyDetails_age_input_node"), "keyup", this.checkAgeInput, this);
			e.on(c.get("ModifyMyDetails_nickname_input_node"), "keyup", this.checkNickInput, this, true);
			e.on(c.get("ModifyMyDetails_occupation_input_node"), "keyup", this.checkOccupationInput, this, true);
			e.on(c.get("ModifyMyDetails_college_input_node"), "keyup", this.checkCollegeInput, this, true);
			e.on(c.get("ModifyMyDetails_ps_input_node"), "keyup", this.checkPsInput, this, true);
			e.on(c.get("ModifyMyDetails_email_input_node"), "blur", this.checkEmailInput, this)
		},
		checkNumberInput : function(g) {
			var f = e.getCharCode(g) || 0;
			if ((f < 48 || f > 57) & f != 8) {
				e.stopEvent(g)
			}
		},
		checkAgeInput : function(f, g) {
			YAHOO.log("checkAgeInput", "error", "mainpanel.js");
		},
		checkEmailInput : function(f) {
			YAHOO.log("checkEmailInput", "error", "mainpanel.js");
		},
		checkNickInput : function() {
			YAHOO.log("checkNickInput", "error", "mainpanel.js");
		},
		checkOccupationInput : function() {
			YAHOO.log("checkOccupationInput", "error", "mainpanel.js");
		},
		checkCollegeInput : function() {
			YAHOO.log("checkCollegeInput", "error", "mainpanel.js");
		},
		checkPsInput : function() {
			YAHOO.log("checkPsInput", "error", "mainpanel.js");
		},
		checkBuddyDetailsNumberInput : function() {
			YAHOO.log("checkBuddyDetailsNumberInput", "error", "mainpanel.js");
			return true
		},
		clickModifyOkButtonHandler : function(g) {
			var i = this.getMyDetailsInfo();
			var f = this, h = {
				onSuccess : f.submitMyDetailsCallback || function() {
				},
				onFail : function() {
					alert("设置失败")
				},
				sscope : f,
				fscope : f,
				arguments : {}
			};
			if (this.checkEmailInput(g) && this.checkBuddyDetailsNumberInput()) {
				this._qqclient.submitMyDetails(h, i)
			}
		},
		submitMyDetailsCallback : function(g) {
			YAHOO.log("submitMyDetailsCallback", "error", "mainpanel.js");
		},
		getMyDetailsInfo : function() {
			YAHOO.log("getMyDetailsInfo", "error", "mainpanel.js");
		},
		loadMyDetails : function() {
			YAHOO.log("loadMyDetails", "error", "mainpanel.js");
		},
		loadMyDetailsToModify : function() {
			YAHOO.log("loadMyDetailsToModify", "error", "mainpanel.js");
		},
		loadBuddyDetails : function(i) {
			YAHOO.log("loadBuddyDetails", "error", "mainpanel.js");
			var g = this._qqclient.bdylist.allUsers[i];
			if (g && g.orig_info) {
				var k = g.orig_info;
				var l = this._qqclient.parseUserDetails(k);
				this.setRealnameButtonDefault();
				this.setBuddyDetails(l);
				this.showBuddyDetailsLoadend()
			} else {
				var f = this, j = {
					onSuccess : function(m) {
						var n = String(m.params[3]);
						n = n.split("\x1e");
						var o = this._qqclient.parseUserDetails(n);
						this.setRealnameButtonDefault();
						this.setBuddyDetails(o);
						if (g && g.level > -1) {
							this.setQQLevelInDetails(g.level)
						} else {
							this.loadQQLevel(i)
						}					
						this.showBuddyDetailsLoadend()
					},
					onFail : function() {
					},
					sscope : f,
					fscope : f,
					arguments : {},
					cmd : "06",
					body : f._qqclient.cs.cs0x06(i)
				};
				this.showBuddyDetailsLoading();
				this.mf_openBuddyDetailsTab();
				var h = this._qqclient.getCmdInfo(j);
				YAHOO.log("loadBuddyDetails:" + h)
			}
		},
		clickViewBuddyDetailsInTips : function(h, g) {
			e.stopEvent(h);
			var f = this.getAttribute("uin");
			g.loadBuddyDetails(f)
		},
		resetBuddyDetails : function() {
			this._buddyDetails_avatar_node.src = "images/qq_avatar_shadow.gif";
		},
		showBuddyDetailsLoading : function() {
			this._buddy_details_loadend_node.style.display = "none";
			this._buddy_details_loading_node.style.display = "block"
		},
		showBuddyDetailsLoadend : function() {
			this._buddy_details_loadend_node.style.display = "block";
			this._buddy_details_loading_node.style.display = "none"
		},
		loadMyQQLevel : function() {
			YAHOO.log("loadMyQQLevel", "error", "mainpanel.js");
		},
		loadQQLevel : function(g) {
			YAHOO.log("loadQQLevel", "error", "mainpanel.js");
		},
		handleQQLeavel : function(h) {
			YAHOO.log("handleQQLeavel", "error", "mainpanel.js");
		},
		setQQLevelInDetails : function(m) {
			YAHOO.log("setQQLevelInDetails", "error", "mainpanel.js");
		},
		loadQzoneBlogInDetails : function(g) {
			YAHOO.log("loadQzoneBlogInDetails", "error", "mainpanel.js");
		},
		handleQzoneBlogInDetails : function() {
			YAHOO.log("handleQzoneBlogInDetails", "error", "mainpanel.js");
		},
		loadMyImpressionInDetails : function() {
			YAHOO.log("loadMyImpressionInDetails", "error", "mainpanel.js");
		},
		handleMyImpressionInDetails : function() {
			YAHOO.log("handleMyImpressionInDetails", "error", "mainpanel.js");
		},
		loadImpressionInDetails : function(h) {
			YAHOO.log("loadImpressionInDetails", "error", "mainpanel.js");
		},
		handleImpressionInDetails : function() {
			YAHOO.log("handleImpressionInDetails", "error", "mainpanel.js");
		},
		clickRealnameModifyButton : function(f) {
			YAHOO.log("clickRealnameModifyButton", "error", "mainpanel.js");
		},
		setRealnameButtonDefault : function(f) {
		},
		clickRealnameSubmitButton : function(h) {
			YAHOO.log("clickRealnameSubmitButton", "error", "mainpanel.js");
		},
		sendSetRealname : function(g, i) {
			YAHOO.log("sendSetRealname", "error", "mainpanel.js");
		},
		onKeydownRealnameInput : function(g) {
			YAHOO.log("onKeydownRealnameInput", "error", "mainpanel.js");
		},
		checkRealnameInputInDetails : function() {
			YAHOO.log("checkRealnameInputInDetails", "error", "mainpanel.js");
		},
		checkRealnameInputInTips : function() {
			YAHOO.log("checkRealnameInputInTips", "error", "mainpanel.js");
		},
		mf_updateMarqueeMsg : function() {
			this.messageMarquee.update()
		},
		mf_HideActWindow : function(g) {
			var f = e.getTarget(g);
			if (this._tabsManage && this._tabsManage._actTalkWin) {
				var h = f.getAttribute("isOpenChatBox");
				if (h != "true" && this._tabsManage._magnetState === 1) {
					this._tabsManage._actTalkWin.mf_HideWindow()
				}
			}
		},
		mf_HideQzoneWindow : function(h) {
			YAHOO.log("mf_HideQzoneWindow", "error", "mainpanel.js");
		},
		mf_DontHideQzoneWindow : function(f) {
			YAHOO.log("mf_DontHideQzoneWindow", "error", "mainpanel.js");
			e.stopPropagation(f);
		},
		mf_OpenVoice : function(f) {
			this._setting_menu_el.className = "voice";
			this._setting_menu_el.title = "声音已开启";
			this._qqclient.setBitValue(28, 1, 1);
			this._qqclient.setBitValue(27, 2, 0)
		},
		mf_CloseVoice : function(f) {
			this._setting_menu_el.className = "novoice";
			this._setting_menu_el.title = "声音已关闭";
			this._qqclient.setBitValue(28, 1, 0)
		},
		disableGroupMsg : function(f) {
			YAHOO.log("disableGroupMsg","error","mainpanel.js");
		},
		enableGroupMsg : function(f) {
			YAHOO.log("enableGroupMsg","error","mainpanel.js");
		},
		mf_StopAllMsg : function(f) {
			this._setting_menu_el.className = "noallvoice";
			this._setting_menu_el.title = "所有消息已屏蔽";
			this._qqclient.setBitValue(27, 2, 3)
		},
		mf_GetTabPos : function() {
			var f = this._qqclient.getBitValue(25, 6) || 0;
			return f
		},
		mf_SetTabPos : function(f) {
			f = f || 0;
			this._qqclient.setBitValue(25, 6, f)
		},
		mf_SetTabDefault : function(f) {
			var g = CHATTY.obj.QQClient.mainPanel;
			this.mf_SetTabPos(f);
			c.setStyle(g._set_tab_default_button_el, "display", "none");
			c.setStyle(g._cancel_tab_default_button_el, "display", "block")
		},
		mf_CancelTabDefault : function() {
			this.mf_SetTabPos(0);
			c.setStyle(this._set_tab_default_button_el, "display", "block");
			c.setStyle(this._cancel_tab_default_button_el, "display", "none")
		},
		mf_InitMainContent : function() {
			this._man_statistic_el.innerHTML = this._qqclient.bdylist.male.on + "/" + this._qqclient.bdylist.male.total;
			this._girl_statistic_el.innerHTML = this._qqclient.bdylist.female.on + "/" + this._qqclient.bdylist.female.total;
			e.on(this._friend_msg_link_ref, "click", this.mf_switchToFriendMsg, this, true);
			e.on(this._class_msg_link_ref, "click", this.mf_switchToClassMsg, this, true);
			e.on(this._mail_link_ref, "click", this.mf_switchToMail, this, true);
			e.on(this._sysmsg_link_ref, "click", this.mf_switchToSysMsg, this, true)
		},
		mf_switchToFriendMsg : function(f) {
			if (this._friend_offmsg_ex_el.title == "展开") {
				this.mf_ExpandFriendOffMsg(f)
			}
			if (this._class_offmsg_ex_el.title == "收起") {
				this.mf_ExpandClassOffMsg(f)
			}
			if (this._mail_msg_ex_el.title == "收起") {
				this.mf_ExpandMailMsg(f)
			}
			if (this._sysmsg_ex_el.title == "收起") {
				this.mf_ExpandSysMsg(f)
			}
		},
		mf_switchToClassMsg : function(f) {
			if (this._friend_offmsg_ex_el.title == "收起") {
				this.mf_ExpandFriendOffMsg(f)
			}
			if (this._class_offmsg_ex_el.title == "展开") {
				this.mf_ExpandClassOffMsg(f)
			}
			if (this._mail_msg_ex_el.title == "收起") {
				this.mf_ExpandMailMsg(f)
			}
			if (this._sysmsg_ex_el.title == "收起") {
				this.mf_ExpandSysMsg(f)
			}
		},
		mf_switchToMail : function(f) {
			if (this._friend_offmsg_ex_el.title == "收起") {
				this.mf_ExpandFriendOffMsg(f)
			}
			if (this._class_offmsg_ex_el.title == "收起") {
				this.mf_ExpandClassOffMsg(f)
			}
			if (this._mail_msg_ex_el.title == "展开") {
				this.mf_ExpandMailMsg(f)
			}
			if (this._sysmsg_ex_el.title == "收起") {
				this.mf_ExpandSysMsg(f)
			}
		},
		mf_switchToSysMsg : function(f) {
			if (this._friend_offmsg_ex_el.title == "收起") {
				this.mf_ExpandFriendOffMsg(f)
			}
			if (this._class_offmsg_ex_el.title == "收起") {
				this.mf_ExpandClassOffMsg(f)
			}
			if (this._mail_msg_ex_el.title == "收起") {
				this.mf_ExpandMailMsg(f)
			}
			if (this._sysmsg_ex_el.title == "展开") {
				this.mf_ExpandSysMsg(f)
			}
		},
		mf_IgnoreFriendOffMsg : function(m) {
			var l = this._friend_offmsg_area_c_el.childNodes;
			for ( var j = l.length - 1; j >= 0; j--) {
				var h = l[j], f = h.id || "", k = f.substr(f.indexOf("middle_") + 7);
				this._qqclient.removeNotify(k);
				this._friend_offmsg_area_c_el.removeChild(h);
				var g = this._qqclient.offline_msg;
				for ( var j = 0; j < g.length; j++) {
					if (g[j] == k) {
						g.splice(j, 1);
						break
					}
				}
			}
			this._friend_msg_count_ref.innerHTML = 0;
			this._friend_msg_count2_ref.innerHTML = 0;
			this._friend_offmsg_area_h_el.style.display = "block";
			e.stopEvent(m)
		},
		mf_IgnoreClassOffMsg : function(m) {
			var l = this._class_offmsg_area_c_el.childNodes;
			for ( var j = l.length - 1; j >= 0; j--) {
				var h = l[j], f = h.id || "", k = f.substr(f.indexOf("middle_") + 7);
				this._qqclient.removeNotify(k);
				this._class_offmsg_area_c_el.removeChild(h);
				var g = this._qqclient.offline_msg;
				for ( var j = 0; j < g.length; j++) {
					if (g[j] == k) {
						g.splice(j, 1);
						break
					}
				}
			}
			this._class_msg_count_ref.innerHTML = 0;
			this._class_msg_count2_ref.innerHTML = 0;
			this._class_offmsg_area_h_el.style.display = "block";
			e.stopEvent(m)
		},
		mf_refreshMailMsg : function(f) {
			this.mf_setMailLoadingStatus();
			this.mf_getLoginMailInfo();
			e.stopEvent(f)
		},
		mf_ExpandFriendOffMsg : function(f) {
			this._friend_offmsg_ex_el.title = this._friend_offmsg_ex_el.title == "展开" ? "收起" : "展开";
			if (this._friend_offmsg_ex_el.title == "展开") {
				c.replaceClass(this._friend_offmsg_ex_el, "showall", "hiddenall")
			} else {
				c.replaceClass(this._friend_offmsg_ex_el, "hiddenall", "showall")
			}
			this._friend_offmsg_area_el.style.display = this._friend_offmsg_area_el.style.display == "none" ? "block" : "none";
			e.stopEvent(f)
		},
		mf_ExpandClassOffMsg : function(f) {
			this._class_offmsg_ex_el.title = this._class_offmsg_ex_el.title == "展开" ? "收起" : "展开";
			if (this._class_offmsg_ex_el.title == "展开") {
				c.replaceClass(this._class_offmsg_ex_el, "showall", "hiddenall")
			} else {
				c.replaceClass(this._class_offmsg_ex_el, "hiddenall", "showall")
			}
			this._class_offmsg_area_el.style.display = this._class_offmsg_area_el.style.display == "none" ? "block" : "none";
			e.stopEvent(f)
		},
		mf_ExpandMailMsg : function(f) {
			this._mail_msg_ex_el.title = this._mail_msg_ex_el.title == "展开" ? "收起" : "展开";
			if (this._mail_msg_ex_el.title == "展开") {
				c.replaceClass(this._mail_msg_ex_el, "showall", "hiddenall")
			} else {
				c.replaceClass(this._mail_msg_ex_el, "hiddenall", "showall")
			}
			this._mail_msg_area_el.style.display = this._mail_msg_area_el.style.display == "none" ? "block" : "none";
			e.stopEvent(f)
		},
		mf_ExpandSysMsg : function(f) {
			this._sysmsg_ex_el.title = this._sysmsg_ex_el.title == "展开" ? "收起" : "展开";
			if (this._sysmsg_ex_el.title == "展开") {
				c.replaceClass(this._sysmsg_ex_el, "showall", "hiddenall")
			} else {
				c.replaceClass(this._sysmsg_ex_el, "hiddenall", "showall")
			}
			this._sysmsg_area_el.style.display = this._sysmsg_area_el.style.display == "none" ? "block" : "none";
			e.stopEvent(f)
		},
		mf_chatWithBuddy : function(g, h) {
			e.stopEvent(g);
			var f = this.getAttribute("buddy_uin");
			h._qqclient.actChat(f)
		},
		mf_openMarqueeMsg : function(j) {
			var h = this.mf_getMarqueeMsgType(j);
			if (h == "beAddedMsg40") {
				var g = this.mf_getMarqueeSysMsgId(j);
				this.mf_beAddedByOtherUser40(g);
				var i = this.mf_getNodeOfEvent(j);
				this.mf_removeMarqueeMsg(i);
				var f = c.get("beAddedMsgInSysMsgBox_" + i.id.split("beAddedMsgInMarqueeMsgBox_")[1]);
				c.replaceClass(f, "sysMsgNotRead", "sysMsgHadRead")
			} else {
				if (h == "beAddedMsg41") {
					var g = this.mf_getMarqueeSysMsgId(j);
					this.mf_beAddedByOtherUser41(g);
					var i = this.mf_getNodeOfEvent(j);
					this.mf_removeMarqueeMsg(i);
					var f = c.get("beAddedMsgInSysMsgBox_" + i.id.split("beAddedMsgInMarqueeMsgBox_")[1]);
					c.replaceClass(f, "sysMsgNotRead", "sysMsgHadRead")
				} else {
					if (h == "beAddedMsg43") {
						var g = this.mf_getMarqueeSysMsgId(j);
						this.mf_allowAddbuddy43(g);
						var i = this.mf_getNodeOfEvent(j);
						this.mf_removeMarqueeMsg(i);
						var f = c.get("beAddedMsgInSysMsgBox_" + i.id.split("beAddedMsgInMarqueeMsgBox_")[1]);
						c.replaceClass(f, "sysMsgNotRead", "sysMsgHadRead")
					} else {
						if (h == "beAddedMsg3") {
							var g = this.mf_getMarqueeSysMsgId(j);
							this.mf_beAddedByOtherUser3(g);
							var i = this.mf_getNodeOfEvent(j);
							this.mf_removeMarqueeMsg(i);
							var f = c.get("beAddedMsgInSysMsgBox_" + i.id.split("beAddedMsgInMarqueeMsgBox_")[1]);
							c.replaceClass(f, "sysMsgNotRead", "sysMsgHadRead")
						} else {
							if (h == "beAddedMsg4") {
								var g = this.mf_getMarqueeSysMsgId(j);
								this.mf_beAddedByOtherUser4(g);
								var i = this.mf_getNodeOfEvent(j);
								this.mf_removeMarqueeMsg(i);
								var f = c.get("beAddedMsgInSysMsgBox_" + i.id.split("beAddedMsgInMarqueeMsgBox_")[1]);
								c.replaceClass(f, "sysMsgNotRead", "sysMsgHadRead")
							} else {
								if (h == "") {
									this.mf_ChatWithUser(j)
								}
							}
						}
					}
				}
			}
		},
		mf_removeMarqueeMsg : function(f) {
			if (f && f.parentNode == this._message_marquee_inner_el) {
				this._message_marquee_inner_el.removeChild(f);
				this.mf_updateMarqueeMsg();
				if (this._message_marquee_inner_el.childNodes.length == 0) {
					c.setStyle(this._no_message_marquee_el, "display", "block")
				}
			} else {
			}
		},
		mf_addSysMsg : function(f) {
			switch (f.cs_cmd) {
			case 128:
				this.mf_handleSysMsg_beAddedByOtherUser(f);
				break
			}
		},
		mf_handleSysMsg_beAddedByOtherUser : function(g) {
			var j = new Date();
			j.setTime(parseInt(g.time) * 1000);
			switch (g.msg_type) {
			case 40:
				var k = g.msg_array[0];
				var j = j.format("yyyy-MM-dd") + "&nbsp;&nbsp;&nbsp;" + j.format("hh:mm:ss");
				var f = document.createElement("div");
				f.id = "beAddedMsgInSysMsgBox_" + this._sysMsgBox.length;
				c.addClass(f, "infos");
				c.addClass(f, "sysMsgNotRead");
				f.setAttribute("sysMsgId", this._sysMsgBox.length);
				f.innerHTML = '<div class="rb">												<div class="rbnr">'
						+ j
						+ '</div>										  </div>										  <div class="lb">												 <div class="userinfo userinfo2">														<div class="ltt">															<div class="imnr">																<span class="webico system"></span>													<span class="webname">'
						+ String(g.nick).forHtml()
						+ '</span>															 </div>														</div>														<div class="rtt">															 <div class="rnr rnr2">																 <div id="beAddedMsgText_'
						+ this._sysMsgBox.length + '" class="sysMsgText">' + String(g.nick).forHtml() + "&lt;" + g.from_uin
						+ "&gt;添加您为好友</div>															 </div>														</div>												  </div>										  </div>";
				this._sysmsg_area_c_el.appendChild(f);
				e.on(f, "mouseover", this.mf_msgMouseover);
				e.on(f, "mouseout", this.mf_msgMouseout);
				e.on(f, "click", this.mf_handle_beAddedByOtherUser40, this);
				var l = document.createElement("a");
				c.addClass(l, "sysMsgInMarquee");
				l.setAttribute("uin", g.from_uin);
				l.setAttribute("sysMsgId", this._sysMsgBox.length);
				l.setAttribute("msgType", "beAddedMsg40");
				l.setAttribute("href", "#");
				l.id = "beAddedMsgInMarqueeMsgBox_" + this._sysMsgBox.length;
				l.setAttribute("msg_count", 1);
				l.setAttribute("title", g.nick.forTitle() + "<" + g.from_uin + ">");
				l.innerHTML = g.nick.forHtml() + "<" + g.from_uin + ">添加您为好友";
				this._message_marquee_inner_el.appendChild(l);
				if (this._message_marquee_inner_el.childNodes.length > 0) {
					c.setStyle(this._no_message_marquee_el, "display", "none")
				}
				this.mf_updateMarqueeMsg();
				break;
			case 41:
				var i = g.msg_array[0] == "" ? "(无)" : g.msg_array[0];
				var j = j.format("yyyy-MM-dd") + "&nbsp;&nbsp;&nbsp;" + j.format("hh:mm:ss");
				var f = document.createElement("div");
				f.id = "beAddedMsgInSysMsgBox_" + this._sysMsgBox.length;
				c.addClass(f, "infos");
				c.addClass(f, "sysMsgNotRead");
				f.setAttribute("sysMsgId", this._sysMsgBox.length);
				f.innerHTML = '<div class="rb">												<div class="rbnr">'
						+ j
						+ '</div>										  </div>										  <div class="lb">												 <div class="userinfo userinfo2">														<div class="ltt">															<div class="imnr">																<span class="webico system"></span>													<span class="webname">'
						+ g.nick.forHtml()
						+ '</span>															 </div>														</div>														<div class="rtt">															 <div class="rnr rnr2">																 <div id="beAddedMsgText_'
						+ this._sysMsgBox.length + '" class="sysMsgText">' + g.nick.forHtml() + "&lt;" + g.from_uin + '&gt;请求添加您为好友，附加消息：<span class="buddyMsg">' + String(i).forHtml()
						+ "</span></div>															 </div>														</div>												  </div>										  </div>";
				this._sysmsg_area_c_el.appendChild(f);
				e.on(f, "mouseover", this.mf_msgMouseover);
				e.on(f, "mouseout", this.mf_msgMouseout);
				e.on(f, "click", this.mf_handle_beAddedByOtherUser41, this);
				var l = document.createElement("a");
				c.addClass(l, "sysMsgInMarquee");
				l.setAttribute("uin", g.from_uin);
				l.setAttribute("sysMsgId", this._sysMsgBox.length);
				l.setAttribute("msgType", "beAddedMsg41");
				l.setAttribute("href", "#");
				l.id = "beAddedMsgInMarqueeMsgBox_" + this._sysMsgBox.length;
				l.setAttribute("msg_count", 1);
				l.setAttribute("title", g.nick + "(" + g.from_uin + ")");
				l.innerHTML = g.nick.forHtml() + "<" + g.from_uin + ">请求添加您为好友，附加消息：" + String(i).forHtml();
				this._message_marquee_inner_el.appendChild(l);
				if (this._message_marquee_inner_el.childNodes.length > 0) {
					c.setStyle(this._no_message_marquee_el, "display", "none")
				}
				this.mf_updateMarqueeMsg();
				break;
			case 42:
				break;
			case 43:
				var j = j.format("yyyy-MM-dd") + "&nbsp;&nbsp;&nbsp;" + j.format("hh:mm:ss");
				var f = document.createElement("div");
				f.id = "beAddedMsgInSysMsgBox_" + this._sysMsgBox.length;
				c.addClass(f, "infos");
				c.addClass(f, "sysMsgNotRead");
				f.setAttribute("sysMsgId", this._sysMsgBox.length);
				f.innerHTML = '<div class="rb">												<div class="rbnr">'
						+ j
						+ '</div>										  </div>										  <div class="lb">												 <div class="userinfo userinfo2">														<div class="ltt">															<div class="imnr">																<span class="webico system"></span>													<span class="webname">'
						+ String(g.nick).forHtml()
						+ '</span>															 </div>														</div>														<div class="rtt">															 <div class="rnr rnr2">																 <div id="beAddedMsgText_'
						+ this._sysMsgBox.length + '" class="sysMsgText">' + g.nick.forHtml() + "&lt;" + g.from_uin
						+ "&gt;接受了您的请求并添加您为好友!</div>															 </div>														</div>												  </div>										  </div>";
				this._sysmsg_area_c_el.appendChild(f);
				e.on(f, "mouseover", this.mf_msgMouseover);
				e.on(f, "mouseout", this.mf_msgMouseout);
				e.on(f, "click", this.mf_handle_beAddedByOtherUser43, this);
				var l = document.createElement("a");
				c.addClass(l, "sysMsgInMarquee");
				l.setAttribute("uin", g.from_uin);
				l.setAttribute("sysMsgId", this._sysMsgBox.length);
				l.setAttribute("msgType", "beAddedMsg43");
				l.setAttribute("href", "#");
				l.id = "beAddedMsgInMarqueeMsgBox_" + this._sysMsgBox.length;
				l.setAttribute("msg_count", 1);
				l.setAttribute("title", g.nick.forTitle() + "(" + g.from_uin + ")");
				l.innerHTML = g.nick.forHtml() + "&lt;" + g.from_uin + "&gt;接受了您的请求并添加您为好友!";
				this._message_marquee_inner_el.appendChild(l);
				if (this._message_marquee_inner_el.childNodes.length > 0) {
					c.setStyle(this._no_message_marquee_el, "display", "none")
				}
				this.mf_updateMarqueeMsg();
				break;
			case 44:
				break;
			case 1:
				break;
			case 2:
				break;
			case 3:
				var j = j.format("yyyy-MM-dd") + "&nbsp;&nbsp;&nbsp;" + j.format("hh:mm:ss");
				var f = document.createElement("div");
				f.id = "beAddedMsgInSysMsgBox_" + this._sysMsgBox.length;
				c.addClass(f, "infos");
				c.addClass(f, "sysMsgNotRead");
				f.setAttribute("sysMsgId", this._sysMsgBox.length);
				f.innerHTML = '<div class="rb">												<div class="rbnr">'
						+ j
						+ '</div>										  </div>										  <div class="lb">												 <div class="userinfo userinfo2">														<div class="ltt">															<div class="imnr">																<span class="webico system"></span>													<span class="webname">'
						+ g.nick.forHtml()
						+ '</span>															 </div>														</div>														<div class="rtt">															 <div class="rnr rnr2">																 <div id="beAddedMsgText_'
						+ this._sysMsgBox.length + '" class="sysMsgText">' + g.nick.forHtml() + "&lt;" + g.from_uin
						+ "&gt;同意了您的请求</div>															 </div>														</div>												  </div>										  </div>";
				this._sysmsg_area_c_el.appendChild(f);
				e.on(f, "mouseover", this.mf_msgMouseover);
				e.on(f, "mouseout", this.mf_msgMouseout);
				e.on(f, "click", this.mf_handle_beAddedByOtherUser3, this);
				var l = document.createElement("a");
				c.addClass(l, "sysMsgInMarquee");
				l.setAttribute("uin", g.from_uin);
				l.setAttribute("sysMsgId", this._sysMsgBox.length);
				l.setAttribute("msgType", "beAddedMsg3");
				l.setAttribute("href", "#");
				l.id = "beAddedMsgInMarqueeMsgBox_" + this._sysMsgBox.length;
				l.setAttribute("msg_count", 1);
				l.setAttribute("title", g.nick.forTitle() + "(" + g.from_uin + ")");
				l.innerHTML = g.nick.forHtml() + "&lt;" + g.from_uin + "&gt;同意了您的请求";
				this._message_marquee_inner_el.appendChild(l);
				if (this._message_marquee_inner_el.childNodes.length > 0) {
					c.setStyle(this._no_message_marquee_el, "display", "none")
				}
				this.mf_updateMarqueeMsg();
				break;
			case 4:
				var h = g.msg_array[0] || "";
				var j = j.format("yyyy-MM-dd") + "&nbsp;&nbsp;&nbsp;" + j.format("hh:mm:ss");
				var f = document.createElement("div");
				f.id = "beAddedMsgInSysMsgBox_" + this._sysMsgBox.length;
				c.addClass(f, "infos");
				c.addClass(f, "sysMsgNotRead");
				f.setAttribute("sysMsgId", this._sysMsgBox.length);
				f.innerHTML = '<div class="rb">												<div class="rbnr">'
						+ j
						+ '</div>										  </div>										  <div class="lb">												 <div class="userinfo userinfo2">														<div class="ltt">															<div class="imnr">																<span class="webico system"></span>													<span class="webname">'
						+ g.nick.forHtml()
						+ '</span>															 </div>														</div>														<div class="rtt">															 <div class="rnr rnr2">																 <div id="beAddedMsgText_'
						+ this._sysMsgBox.length + '" class="sysMsgText">' + g.nick.forHtml() + "&lt;" + g.from_uin + "&gt;拒绝了您的请求，附加消息：" + String(h).forHtml()
						+ "</div>															 </div>														</div>												  </div>										  </div>";
				this._sysmsg_area_c_el.appendChild(f);
				e.on(f, "mouseover", this.mf_msgMouseover);
				e.on(f, "mouseout", this.mf_msgMouseout);
				e.on(f, "click", this.mf_handle_beAddedByOtherUser4, this);
				var l = document.createElement("a");
				c.addClass(l, "sysMsgInMarquee");
				l.setAttribute("uin", g.from_uin);
				l.setAttribute("sysMsgId", this._sysMsgBox.length);
				l.setAttribute("msgType", "beAddedMsg4");
				l.setAttribute("href", "#");
				l.id = "beAddedMsgInMarqueeMsgBox_" + this._sysMsgBox.length;
				l.setAttribute("msg_count", 1);
				l.setAttribute("title", g.nick.forTitle() + "(" + g.from_uin + ")");
				l.innerHTML = g.nick.forHtml() + "&lt;" + g.from_uin + "&gt;拒绝了您的请求，附加消息：" + String(h).forHtml() + "";
				this._message_marquee_inner_el.appendChild(l);
				if (this._message_marquee_inner_el.childNodes.length > 0) {
					c.setStyle(this._no_message_marquee_el, "display", "none")
				}
				this.mf_updateMarqueeMsg();
				break;
			default:
				break
			}
			this._sysMsgBox.push(g);
			this._sysmsg_count_ref.innerHTML = parseInt(this._sysmsg_count_ref.innerHTML) + 1;
			this._sysmsg_count2_ref.innerHTML = parseInt(this._sysmsg_count2_ref.innerHTML) + 1;
			this._all_msg_count_el.innerHTML = parseInt(this._friend_msg_count_ref.innerHTML) + parseInt(this._class_msg_count_ref.innerHTML) + parseInt(this._mail_count_ref.innerHTML.split("+")[0])
					+ parseInt(this._sysmsg_count_ref.innerHTML);
			if (this._mail_count_ref.innerHTML.indexOf("+") > 0) {
				this._all_msg_count_el.innerHTML = this._all_msg_count_el.innerHTML + "+"
			}
			if (parseInt(this._sysmsg_count_ref.innerHTML) > 0) {
				c.setStyle(this._sysmsg_area_h_el, "display", "none")
			}
		},
		mf_handle_beAddedByOtherUser3 : function(i, g) {
			var f = this.getAttribute("sysMsgId");
			c.replaceClass(this, "sysMsgNotRead", "sysMsgHadRead");
			var h = c.get("beAddedMsgInMarqueeMsgBox_" + this.id.split("beAddedMsgInSysMsgBox_")[1]);
			g.mf_removeMarqueeMsg(h);
			g.mf_beAddedByOtherUser3(f)
		},
		mf_beAddedByOtherUser3 : function(f) {
			var g = this._sysMsgBox[f];
			this._beAddedAlertBox_node = document.createElement("div");
			c.addClass(this._beAddedAlertBox_node, "alertBox");
			this._beAddedAlertBox_node.setAttribute("sysMsgId", f);
			var h = "", k = "", j = "", i = "";
			k = '<div id="alertCloseButton_1" class="alertCloseButton_1">X</div>											<div class="alertTitle_1">添加好友</div>											<div class="alertMsgTitle_1">												<img id="userAvatar" class="userAvatar" src="'
					+ face_server_domain
					+ "/images/buddy-48x48.png"
					+ '" /><p class="titleText">'
					+ g.nick.forHtml()
					+ "<"
					+ g.from_uin
					+ '>同意了您的请求!</p>											</div>											<div class="alertMsgContent_1">												<p>备注：<input id="buddyRemark" class="buddyRemark" type="text" value="" maxlength="24" /></p>											</div>											<div class="buttonGroup_1">												<input id="alertOkButton" class="button_1" type="button" value="确 定" buddy_uin="'
					+ g.from_uin + '" />												<input id="alertCloseButton_2" class="button_1" type="button" value="关 闭" />											</div>';
			h = k + j + i;
			this._beAddedAlertBox_node.innerHTML = h;
			this._sysbox_node.appendChild(this._beAddedAlertBox_node);
			e.on(c.get("alertCloseButton_1"), "click", this.mf_closeBeAddedAlertBox, this, true);
			e.on(c.get("alertCloseButton_2"), "click", this.mf_closeBeAddedAlertBox, this, true);
			e.on(c.get("buddyRemark"), "keyup", this.mf_checkBuddyRemarkInput, this, true);
			e.on(c.get("buddyRemark"), "blur", this.mf_checkBuddyRemarkInput, this, true);
			e.on(c.get("alertOkButton"), "click", this.clickBeAllowToAddOkButton, this);
			this.mf_openSysBox();
			c.get("buddyRemark").focus();
			this.mf_setSysMsgProcessed(f)
		},
		clickBeAllowToAddOkButton : function(j, h) {
			var g = this.getAttribute("buddy_uin");
			var i = c.get("buddyRemark").value;
			var f = h._qqclient.bdylist.allUsers[g];
			h._qqclient.RemarkFriend(f, i);
			h.mf_closeBeAddedAlertBox()
		},
		mf_setSysMsgProcessed : function(f) {
			if (c.get("beAddedMsgText_" + f).innerHTML.indexOf("(已处理)") == -1) {
				c.get("beAddedMsgText_" + f).innerHTML = "(已处理)&nbsp;" + c.get("beAddedMsgText_" + f).innerHTML
			}
		},
		mf_handle_beAddedByOtherUser4 : function(i, g) {
			var f = this.getAttribute("sysMsgId");
			c.replaceClass(this, "sysMsgNotRead", "sysMsgHadRead");
			var h = c.get("beAddedMsgInMarqueeMsgBox_" + this.id.split("beAddedMsgInSysMsgBox_")[1]);
			g.mf_removeMarqueeMsg(h);
			g.mf_beAddedByOtherUser4(f)
		},
		mf_beAddedByOtherUser4 : function(f) {
			var g = this._sysMsgBox[f];
			var i = g.msg_array[0] || "";
			this._beAddedAlertBox_node = document.createElement("div");
			c.addClass(this._beAddedAlertBox_node, "alertBox");
			this._beAddedAlertBox_node.setAttribute("sysMsgId", f);
			var h = "", l = "", k = "", j = "";
			l = '<div id="alertCloseButton_1" class="alertCloseButton_1">X</div>											<div class="alertTitle_1">添加好友</div>											<div class="alertMsgTitle_1">												<img id="userAvatar" class="userAvatar" src="'
					+ face_server_domain
					+ "/images/buddy-48x48.png"
					+ '" /><p class="titleText">'
					+ g.nick.forHtml()
					+ "<"
					+ g.from_uin
					+ ">拒绝了您的请求，附加消息：" + String(i).forHtml() + '</p>											</div>											<div class="alertMsgContent_1">											</div>											<div class="buttonGroup_1">';
			j = '<input id="alertCloseButton_2" class="button_1" type="button" value="关 闭" />											</div>';
			h = l + k + j;
			this._beAddedAlertBox_node.innerHTML = h;
			this._sysbox_node.appendChild(this._beAddedAlertBox_node);
			e.on(c.get("alertCloseButton_1"), "click", this.mf_closeBeAddedAlertBox, this, true);
			e.on(c.get("alertCloseButton_2"), "click", this.mf_closeBeAddedAlertBox, this, true);
			this.mf_openSysBox();
			c.get("alertCloseButton_2").focus();
			this.mf_setSysMsgProcessed(f)
		},
		mf_handle_beAddedByOtherUser40 : function(i, g) {
			var f = this.getAttribute("sysMsgId");
			c.replaceClass(this, "sysMsgNotRead", "sysMsgHadRead");
			var h = c.get("beAddedMsgInMarqueeMsgBox_" + this.id.split("beAddedMsgInSysMsgBox_")[1]);
			g.mf_removeMarqueeMsg(h);
			g.mf_beAddedByOtherUser40(f)
		},
		mf_beAddedByOtherUser40 : function(f) {
			var g = this._sysMsgBox[f];
			this._beAddedAlertBox_node = document.createElement("div");
			c.addClass(this._beAddedAlertBox_node, "alertBox");
			this._beAddedAlertBox_node.setAttribute("sysMsgId", f);
			var i = "", l = "", k = "", j = "";
			l = '<div id="alertCloseButton_1" class="alertCloseButton_1">X</div>											<div class="alertTitle_1">添加好友</div>											<div class="alertMsgTitle_1">												<img id="userAvatar" class="userAvatar" src="'
					+ face_server_domain
					+ "/cgi/svr/face/getface?type=1&fid=0&me="
					+ this._qqclient.uin
					+ "&uin="
					+ g.from_uin
					+ '" /><p class="titleText">'
					+ g.nick.forHtml()
					+ "<"
					+ g.from_uin
					+ '>添加您为好友!</p>											</div>											<div class="alertMsgContent_1">											</div>											<div class="buttonGroup_1">';
			if (this._qqclient.isFriend(g.from_uin) === -1) {
				k = '<input id="addOppositeButton" class="button_1" type="button" value="加为好友" /> '
			}
			j = '<input id="alertCloseButton_2" class="button_1" type="button" value="关 闭" />											</div>';
			i = l + k + j;
			this._beAddedAlertBox_node.innerHTML = i;
			this._sysbox_node.appendChild(this._beAddedAlertBox_node);
			var h = c.get("addOppositeButton");
			if (h) {
				e.on(h, "click", this.mf_handle_addOpposite, this, true)
			}
			e.on(c.get("alertCloseButton_1"), "click", this.mf_closeBeAddedAlertBox, this, true);
			e.on(c.get("alertCloseButton_2"), "click", this.mf_closeBeAddedAlertBox, this, true);
			this.mf_openSysBox();
			c.get("alertCloseButton_2").focus();
			this.mf_setSysMsgProcessed(f)
		},
		mf_handle_addOpposite : function() {
			var g = this._beAddedAlertBox_node.getAttribute("sysMsgId");
			var f = this._sysMsgBox[g];
			var p = (f.msg_array[0] == "" ? "(无)" : f.msg_array[0]), j = f.msg_array[1];
			var l = 0;
			var h = "", o = "", n = "", m = "";
			o = '<div id="alertCloseButton_1" class="alertCloseButton_1">X</div>											<div class="alertTitle_1">添加好友</div>											<div class="alertMsgTitle_1">												<img id="userAvatar" class="userAvatar" src="'
					+ face_server_domain
					+ "/cgi/svr/face/getface?type=1&fid=0&me="
					+ this._qqclient.uin
					+ "&uin="
					+ f.from_uin
					+ '" /><p class="titleText">添加'
					+ f.nick.forHtml()
					+ "<"
					+ f.from_uin
					+ '>为好友!</p>											</div>											<div class="alertMsgContent_1">												<label id="acceptBeAddedLabel_1" class="labelBeAddedRadio" for="acceptBeAddedRadio_1">													<div id="acceptBeAddedLabel_1_reveal" class="acceptBeAddedLabel_1_reveal">												        <p>备注：<input id="buddyRemark" class="buddyRemark" type="text" value="" maxlength="24" /></p>												        <p class="selectBuddyGroupOuter">															分组：<select id="selectBuddyGroup" class="selectBuddyGroup">';
			for ( var k in this._qqclient.bdylist.groups) {
				if (k != "_1000" && k != "1000" && k != "1001") {
					var q = "";
					if (l == 0) {
						q = 'selected="selected"'
					}
					n += '<option value="' + this._qqclient.bdylist.groups[k].id + '" ' + q + " >" + this._qqclient.bdylist.groups[k].name + "</option>";
					l++
				}
			}
			m = '</select>														</p>												    </div>												</label>											</div>											<div class="buttonGroup_1">												<input id="alertOkButton" class="button_1" type="button" value="确 定" />												<input id="alertCloseButton_2" class="button_1" type="button" value="关 闭" />											</div>';
			h = o + n + m;
			this._beAddedAlertBox_node.innerHTML = h;
			e.on(c.get("buddyRemark"), "keyup", this.mf_checkBuddyRemarkInput, this, true);
			e.on(c.get("buddyRemark"), "blur", this.mf_checkBuddyRemarkInput, this, true);
			e.on(c.get("alertOkButton"), "click", this.mf_reversedAddOpposite, this, true);
			e.on(c.get("alertCloseButton_1"), "click", this.mf_closeBeAddedAlertBox, this, true);
			e.on(c.get("alertCloseButton_2"), "click", this.mf_closeBeAddedAlertBox, this, true);
			this.mf_openSysBox();
			c.get("buddyRemark").focus()
		},
		mf_handle_beAddedByOtherUser41 : function(i, g) {
			var f = this.getAttribute("sysMsgId");
			c.replaceClass(this, "sysMsgNotRead", "sysMsgHadRead");
			var h = c.get("beAddedMsgInMarqueeMsgBox_" + this.id.split("beAddedMsgInSysMsgBox_")[1]);
			g.mf_removeMarqueeMsg(h);
			g.mf_beAddedByOtherUser41(f)
		},
		mf_beAddedByOtherUser41 : function(g) {
			var f = this._sysMsgBox[g];
			var p = f.msg_array[0] == "" ? "(无)" : f.msg_array[0];
			var j = f.msg_array[1];
			this._beAddedAlertBox_node = document.createElement("div");
			c.addClass(this._beAddedAlertBox_node, "alertBox");
			this._beAddedAlertBox_node.setAttribute("sysMsgId", g);
			var l = 0;
			var h = "", o = "", n = "", m = "";
			o = '<div id="alertCloseButton_1" class="alertCloseButton_1">X</div>												<div class="alertTitle_1">添加好友</div>												<div class="alertMsgTitle_1">													<img id="userAvatar" class="userAvatar" src="'
					+ face_server_domain
					+ "/cgi/svr/face/getface?type=1&fid=0&me="
					+ this._qqclient.uin
					+ "&uin="
					+ f.from_uin
					+ '" /><p class="titleText">'
					+ f.nick.forHtml()
					+ "<"
					+ f.from_uin
					+ '>请求添加您为好友!</p>												</div>												<div class="alertMsgContent_1">													<p>附加消息:</p>													<p class="userSendMsg">'
					+ String(p).forHtml()
					+ '</p>													<label id="acceptBeAddedLabel_1" class="labelBeAddedRadio" for="acceptBeAddedRadio_1">														<input id="acceptBeAddedRadio_1" name="beAddedRadio" class="radio" type="radio" value="同意并添加对方为好友" checked="checked" /><span class="selectLabelText">同意并添加对方为好友</span>														<div id="acceptBeAddedLabel_1_reveal" class="acceptBeAddedLabel_1_reveal">													        <p>备注：<input id="buddyRemark" class="buddyRemark" type="text" value="" maxlength="24" /></p>													        <p class="selectBuddyGroupOuter">																分组：<select id="selectBuddyGroup" class="selectBuddyGroup">';
			for ( var k in this._qqclient.bdylist.groups) {
				if (k != "_1000" && k != "1000" && k != "1001") {
					var q = "";
					if (l == 0) {
						q = 'selected="selected"'
					}
					n += '<option value="' + this._qqclient.bdylist.groups[k].id + '" ' + q + " >" + this._qqclient.bdylist.groups[k].name + "</option>";
					l++
				}
			}
			m = '</select>															</p>													    </div>													</label>													<label style="display:none;" id="acceptBeAddedLabel_2" class="labelBeAddedRadio" for="acceptBeAddedRadio_2">														<input id="acceptBeAddedRadio_2" name="beAddedRadio" class="radio" type="radio" value="同意" /><span class="selectLabelText">同意</span>													</label>													<label id="refuseBeAddedLabel" class="labelBeAddedRadio" for="refuseBeAddedRadio">														<input id="refuseBeAddedRadio" name="beAddedRadio" class="radio" type="radio" value="拒绝" /><span class="selectLabelText">拒绝</span>													    <div id="refuseBeAddedRadio_reveal" class="refuseBeAddedRadio_reveal">													        <textarea id="refuseBeAddedRadioMsg" class="refuseBeAddedRadioMsg" maxlength="50">拒绝理由</textarea>													    </div>													</label>												</div>												<div class="buttonGroup_1">													<input id="alertOkButton" class="button_1" type="button" value="确 定" />													<input id="alertCloseButton_2" class="button_1" type="button" value="关 闭" />												</div>';
			h = o + n + m;
			this._beAddedAlertBox_node.innerHTML = h;
			this._sysbox_node.appendChild(this._beAddedAlertBox_node);
			this.mf_openSysBox();
			e.on(c.get("buddyRemark"), "keyup", this.mf_checkBuddyRemarkInput, this, true);
			e.on(c.get("buddyRemark"), "blur", this.mf_checkBuddyRemarkInput, this, true);
			e.on(c.get("acceptBeAddedLabel_1"), "click", this.mf_setToAcceptAndAddOpposite, this, true);
			e.on(c.get("acceptBeAddedLabel_2"), "click", this.mf_setToAcceptBeAdded, this, true);
			e.on(c.get("refuseBeAddedLabel"), "click", this.mf_setToRefuseBeAdded, this, true);
			e.on(c.get("refuseBeAddedRadioMsg"), "focus", this.mf_handle_refuseBeAddedRadioMsgOnFocus);
			this.mf_setToAcceptAndAddOpposite();
			c.get("buddyRemark").focus();
			e.on(c.get("alertCloseButton_1"), "click", this.mf_closeBeAddedAlertBox, this, true);
			e.on(c.get("alertCloseButton_2"), "click", this.mf_closeBeAddedAlertBox, this, true)
		},
		mf_checkBuddyRemarkInput : function() {
			this.mf_adjustInput(c.get("buddyRemark"), 16)
		},
		mf_adjustInput : function(i, g) {
			var f = i.value;
			var h = f.getCharLength();
			if (h > g) {
				i.value = f.cutRight(1);
				this.mf_adjustInput(i, g)
			}
		},
		mf_handle_beAddedByOtherUser43 : function(i, g) {
			var f = this.getAttribute("sysMsgId");
			c.replaceClass(this, "sysMsgNotRead", "sysMsgHadRead");
			var h = c.get("beAddedMsgInMarqueeMsgBox_" + this.id.split("beAddedMsgInSysMsgBox_")[1]);
			g.mf_removeMarqueeMsg(h);
			g.mf_allowAddbuddy43(f)
		},
		mf_allowAddbuddy43 : function(f) {
			var g = this._sysMsgBox[f];
			this._beAddedAlertBox_node = document.createElement("div");
			c.addClass(this._beAddedAlertBox_node, "alertBox");
			this._beAddedAlertBox_node.setAttribute("sysMsgId", f);
			var i = "", l = "", k = "", j = "";
			l = '<div id="alertCloseButton_1" class="alertCloseButton_1">X</div>											<div class="alertTitle_1">添加好友</div>											<div class="alertMsgTitle_1">												<img id="userAvatar" class="userAvatar" src="'
					+ face_server_domain
					+ "/cgi/svr/face/getface?type=1&fid=0&me="
					+ this._qqclient.uin
					+ "&uin="
					+ g.from_uin
					+ '" /><p class="titleText">'
					+ String(g.nick).forHtml()
					+ "<"
					+ g.from_uin
					+ '>接受了您的请求并添加您为好友!</p>											</div>											<div class="alertMsgContent_1">												<p>备注：<input id="buddyRemark" class="buddyRemark" type="text" value="" maxlength="24" /></p>											</div>											<div class="buttonGroup_1">												<input id="alertOkButton" class="button_1" type="button" value="确 定" buddy_uin="'
					+ g.from_uin + '" />												<input id="alertCloseButton_2" class="button_1" type="button" value="关 闭" />											</div>';
			i = l + k + j;
			this._beAddedAlertBox_node.innerHTML = i;
			this._sysbox_node.appendChild(this._beAddedAlertBox_node);
			var h = c.get("addOppositeButton");
			if (h) {
				e.on(h, "click", this.mf_handle_addOpposite, this, true)
			}
			e.on(c.get("alertCloseButton_1"), "click", this.mf_closeBeAddedAlertBox, this, true);
			e.on(c.get("alertCloseButton_2"), "click", this.mf_closeBeAddedAlertBox, this, true);
			e.on(c.get("buddyRemark"), "keyup", this.mf_checkBuddyRemarkInput, this, true);
			e.on(c.get("buddyRemark"), "blur", this.mf_checkBuddyRemarkInput, this, true);
			e.on(c.get("alertOkButton"), "click", this.clickBeAllowToAddOkButton, this);
			this.mf_openSysBox();
			c.get("alertCloseButton_2").focus();
			this.mf_setSysMsgProcessed(f)
		},
		mf_handle_refuseBeAddedRadioMsgOnFocus : function() {
			if (this.value.trim() == "拒绝理由") {
				this.value = ""
			}
		},
		mf_reversedAddOpposite : function() {
			var g = c.get("selectBuddyGroup").value;
			var i = c.get("buddyRemark").value.trim();
			var f = this._beAddedAlertBox_node.getAttribute("sysMsgId");
			var h = {
				type : 1,
				from_uin : this._sysMsgBox[f].from_uin,
				signature : this._sysMsgBox[f].msg_array[0],
				group_id : g,
				realname : i
			};
			this._qqclient.addFriendPassive(h);
			this.mf_closeBeAddedAlertBox()
		},
		mf_setToAcceptAndAddOpposite : function() {
			c.setStyle(c.get("acceptBeAddedLabel_1_reveal"), "display", "block");
			c.setStyle(c.get("refuseBeAddedRadio_reveal"), "display", "none");
			e.removeListener(c.get("alertOkButton"), "click");
			e.on(c.get("alertOkButton"), "click", this.mf_acceptAndAddOpposite, this, true)
		},
		mf_setToAcceptBeAdded : function() {
			c.setStyle(c.get("acceptBeAddedLabel_1_reveal"), "display", "none");
			c.setStyle(c.get("refuseBeAddedRadio_reveal"), "display", "none");
			e.removeListener(c.get("alertOkButton"), "click");
			e.on(c.get("alertOkButton"), "click", this.mf_acceptBeAdded, this, true)
		},
		mf_setToRefuseBeAdded : function() {
			c.setStyle(c.get("acceptBeAddedLabel_1_reveal"), "display", "none");
			c.setStyle(c.get("refuseBeAddedRadio_reveal"), "display", "block");
			e.removeListener(c.get("alertOkButton"), "click");
			e.on(c.get("alertOkButton"), "click", this.mf_refuseBeAdded, this, true)
		},
		mf_acceptAndAddOpposite : function() {
			var g = c.get("selectBuddyGroup").value;
			var i = c.get("buddyRemark").value.trim();
			var f = this._beAddedAlertBox_node.getAttribute("sysMsgId");
			var h = {
				type : 3,
				from_uin : this._sysMsgBox[f].from_uin,
				group_id : g,
				realname : i
			};
			this._qqclient.addFriendPassive(h);
			this.mf_closeBeAddedAlertBox();
			var j = c.get("beAddedMsgInSysMsgBox_" + f);
			e.removeListener(j, "click");
			e.on(j, "click", this.mf_hadAcceptAndAddOpposite, this);
			this.mf_setSysMsgProcessed(f)
		},
		mf_hadAcceptAndAddOpposite : function(j, g) {
			var f = this.getAttribute("sysMsgId");
			var h = g._sysMsgBox[f];
			var i = "";
			i = '<div id="alertCloseButton_1" class="alertCloseButton_1">X</div>											<div class="alertTitle_1">添加好友</div>											<div class="alertMsgTitle_1">												<img id="userAvatar" class="userAvatar" src="'
					+ face_server_domain
					+ "/cgi/svr/face/getface?type=1&fid=0&me="
					+ g._qqclient.uin
					+ "&uin="
					+ h.from_uin
					+ '" /><p class="titleText">你已经同意'
					+ h.nick.forHtml()
					+ "<"
					+ h.from_uin
					+ '>的请求并添加其为好友!</p>											</div>											<div class="alertMsgContent_1">											</div>											<div class="buttonGroup_1">												<input id="alertCloseButton_2" class="button_1" type="button" value="关 闭" />											</div>';
			g._beAddedAlertBox_node.innerHTML = i;
			g._sysbox_node.appendChild(g._beAddedAlertBox_node);
			e.on(c.get("alertCloseButton_1"), "click", g.mf_closeBeAddedAlertBox, g, true);
			e.on(c.get("alertCloseButton_2"), "click", g.mf_closeBeAddedAlertBox, g, true);
			g.mf_openSysBox();
			c.get("alertCloseButton_2").focus()
		},
		mf_acceptBeAdded : function() {
			var f = this._beAddedAlertBox_node.getAttribute("sysMsgId");
			var g = {
				type : 4,
				from_uin : this._sysMsgBox[f].from_uin
			};
			this._qqclient.addFriendPassive(g);
			this.mf_closeBeAddedAlertBox();
			var h = c.get("beAddedMsgInSysMsgBox_" + f);
			e.removeListener(h, "click");
			e.on(h, "click", this.mf_hadAcceptBeAdded, this);
			this.mf_setSysMsgProcessed(f)
		},
		mf_hadAcceptBeAdded : function(j, g) {
			var f = this.getAttribute("sysMsgId");
			var h = g._sysMsgBox[f];
			var i = "";
			i = '<div id="alertCloseButton_1" class="alertCloseButton_1">X</div>											<div class="alertTitle_1">添加好友</div>											<div class="alertMsgTitle_1">												<img id="userAvatar" class="userAvatar" src="'
					+ face_server_domain
					+ "/cgi/svr/face/getface?type=1&fid=0&me="
					+ g._qqclient.uin
					+ "&uin="
					+ h.from_uin
					+ '" /><p class="titleText">你已经同意'
					+ h.nick.forHtml()
					+ "<"
					+ h.from_uin
					+ '>的请求!</p>											</div>											<div class="alertMsgContent_1">											</div>											<div class="buttonGroup_1">												<input id="alertCloseButton_2" class="button_1" type="button" value="关 闭" />											</div>';
			g._beAddedAlertBox_node.innerHTML = i;
			g._sysbox_node.appendChild(g._beAddedAlertBox_node);
			e.on(c.get("alertCloseButton_1"), "click", g.mf_closeBeAddedAlertBox, g, true);
			e.on(c.get("alertCloseButton_2"), "click", g.mf_closeBeAddedAlertBox, g, true);
			g.mf_openSysBox();
			c.get("alertCloseButton_2").focus()
		},
		mf_refuseBeAdded : function() {
			var f = this._beAddedAlertBox_node.getAttribute("sysMsgId");
			var j = c.get("refuseBeAddedRadioMsg");
			var g = String(j.value) == "拒绝理由" ? "" : String(j.value);
			var h = {
				type : 5,
				from_uin : this._sysMsgBox[f].from_uin,
				msg : g
			};
			this._qqclient.addFriendPassive(h);
			this.mf_closeBeAddedAlertBox();
			var i = c.get("beAddedMsgInSysMsgBox_" + f);
			e.removeListener(i, "click");
			e.on(i, "click", this.mf_hadRefuseBeAdded, this);
			this.mf_setSysMsgProcessed(f)
		},
		mf_hadRefuseBeAdded : function(j, g) {
			var f = this.getAttribute("sysMsgId");
			var h = g._sysMsgBox[f];
			var i = "";
			i = '<div id="alertCloseButton_1" class="alertCloseButton_1">X</div>											<div class="alertTitle_1">添加好友</div>											<div class="alertMsgTitle_1">												<img id="userAvatar" class="userAvatar" src="'
					+ face_server_domain
					+ "/cgi/svr/face/getface?type=1&fid=0&me="
					+ g._qqclient.uin
					+ "&uin="
					+ h.from_uin
					+ '" /><p class="titleText">你已经拒绝'
					+ h.nick.forHtml()
					+ "<"
					+ h.from_uin
					+ '>的请求!</p>											</div>											<div class="alertMsgContent_1">											</div>											<div class="buttonGroup_1">												<input id="alertCloseButton_2" class="button_1" type="button" value="关 闭" />											</div>';
			g._beAddedAlertBox_node.innerHTML = i;
			g._sysbox_node.appendChild(g._beAddedAlertBox_node);
			e.on(c.get("alertCloseButton_1"), "click", g.mf_closeBeAddedAlertBox, g, true);
			e.on(c.get("alertCloseButton_2"), "click", g.mf_closeBeAddedAlertBox, g, true);
			g.mf_openSysBox();
			c.get("alertCloseButton_2").focus()
		},
		mf_closeBeAddedAlertBox : function() {
			this.mf_closeSysBox()
		},
		mf_openSysBox : function() {
			this.showCoverLayer()
		},
		mf_closeSysBox : function() {
			this._sysbox_node.innerHTML = "";
			this.hideCoverLayer()
		},
		showCoverLayer : function() {
			this._cover_layer_node.style.display = "block"
		},
		hideCoverLayer : function() {
			this._cover_layer_node.style.display = "none"
		},
		mf_addOffMsg : function(g, l, o, h, f) {
			var s = this._qqclient.offline_msg;
			var t = false;
			if (this._qqclient.bdylist.allUsers[g] && this._qqclient.bdylist.allUsers[g].group_id == "1001") {
				return false
			}
			for ( var v = 0; v < s.length; v++) {
				if (s[v] == g) {
					t = true
				}
			}
			o = o || "   ";
			var q = o.split(" ");
			o = q[0] + "&nbsp;&nbsp;&nbsp;" + q[1];
			var j, w = this._qqclient.bdylist.allClasses[g];
			var x;
			if (1 == h) {
				j = this._qqclient.bdylist.allUsers[g].remark || this._qqclient.bdylist.allUsers[g].nick || g;
				var p = this._qqclient.bdylist.allUsers[g].face || 0;
				x = face_server_domain + "/cgi/svr/face/getface?type=1&fid=" + p + "&me=" + this._qqclient.uin + "&uin=" + g
			} else {
				var w = this._qqclient.bdylist.allClasses[g], u = (w.property == 1) ? 2002 : 2001;
				j = w.name || w.code;
				x = face_server_domain + "/cgi/svr/face/getface?type=4&fid=" + u + "&me=" + this._qqclient.uin + "&uin=" + f || w.code
			}
			if (!t) {
				s.push(g);
				var y, k;
				switch (h) {
				case 1:
					y = this._friend_offmsg_area_h_el;
					k = this._friend_offmsg_area_c_el;
					this._friend_msg_count_ref.innerHTML = parseInt(this._friend_msg_count_ref.innerHTML) + 1;
					this._friend_msg_count2_ref.innerHTML = parseInt(this._friend_msg_count2_ref.innerHTML) + 1;
					break;
				case 2:
					y = this._class_offmsg_area_h_el;
					k = this._class_offmsg_area_c_el;
					this._class_msg_count_ref.innerHTML = parseInt(this._class_msg_count_ref.innerHTML) + 1;
					this._class_msg_count2_ref.innerHTML = parseInt(this._class_msg_count2_ref.innerHTML) + 1;
					break;
				default:
					break
				}
				this._all_msg_count_el.innerHTML = parseInt(this._friend_msg_count_ref.innerHTML) + parseInt(this._class_msg_count_ref.innerHTML)
						+ parseInt(this._mail_count_ref.innerHTML.split("+")[0]) + parseInt(this._sysmsg_count_ref.innerHTML);
				if (this._mail_count_ref.innerHTML.indexOf("+") > 0) {
					this._all_msg_count_el.innerHTML = this._all_msg_count_el.innerHTML + "+"
				}
				var m = document.createElement("div");
				m.id = "middle_" + g;
				m.setAttribute("msg_count", 1);
				c.addClass(m, "middle-menus infos");
				m.innerHTML = '<div class="rb">								 <div class="rbnr">'
						+ o
						+ '</div>									</div>									<div class="lb">									   <div class="userinfo userinfo2">											<div class="ltt">												<div class="imnr">													<a href="#" uin="'
						+ g + '"><img src="' + x + '" alt="" /></a>													<span><a href="#" uin="' + g + '">' + String(j).forHtml()
						+ '</a></span>												</div>											</div>											<div class="rtt">												<div class="rnr rnr2">													<div><a href="#" uin="' + g + '">' + l
						+ "</a></div>												</div>											 </div>										</div>									</div>";
				k.appendChild(m);
				e.on(m, "click", this.mf_ChatWithUser, this, true);
				e.on(m, "mouseover", this.mf_msgMouseover);
				e.on(m, "mouseout", this.mf_msgMouseout);
				var r = document.createElement("a");
				r.setAttribute("uin", g);
				r.setAttribute("href", "#");
				r.id = "marqueeMsg_" + g;
				r.setAttribute("msg_count", 1);
				r.setAttribute("isOpenChat", "true");
				if (h == 1) {
					r.setAttribute("title", String(j).forTitle() + "<" + g + ">");
					r.innerHTML = "【" + String(j).forHtml() + "】来消息了: " + l
				} else {
					r.setAttribute("title", String(j).forTitle() + "<" + f + ">");
					r.innerHTML = "【" + String(j).Html() + "】来消息了: " + l
				}
				this._message_marquee_inner_el.appendChild(r);
				if (this._message_marquee_inner_el.childNodes.length > 0) {
					c.setStyle(this._no_message_marquee_el, "display", "none")
				}
				if (k.childNodes.length > 0) {
					c.setStyle(y, "display", "none")
				}
			} else {
				var m = c.get("middle_" + g);
				m.setAttribute("msg_count", (parseInt(m.getAttribute("msg_count")) + 1));
				m.innerHTML = '<div class="rb">								 <div class="rbnr">'
						+ o
						+ '</div>									</div>									<div class="lb">									   <div class="userinfo userinfo2">											<div class="ltt">												<div class="imnr">													<a href="#" uin="'
						+ g + '"><img src="' + x + '" alt="" /></a>													<span><a href="#" uin="' + g + '">' + String(j).forHtml()
						+ '</a></span>												</div>											</div>											<div class="rtt">												<div class="rnr rnr2">													<div><a href="#" uin="' + g + '">' + l
						+ "<span style='font-weight:bold;'>(" + m.getAttribute("msg_count") + ")</span></a></div>												</div>											 </div>										</div>									</div>";
				var r = c.get("marqueeMsg_" + g);
				r.setAttribute("msg_count", (parseInt(r.getAttribute("msg_count")) + 1));
				if (h == 1) {
					r.innerHTML = "【" + String(j).forHtml() + "】来消息了: " + l + "<span style='font-weight:bold;'>(" + r.getAttribute("msg_count") + ")</span>"
				} else {
					r.innerHTML = "【" + String(j).forHtml() + "】来消息了: " + l + "<span style='font-weight:bold;'>(" + r.getAttribute("msg_count") + ")</span>"
				}
			}
			this.mf_updateMarqueeMsg()
		},
		mf_getRemoteJs : function(g, f, i) {
			var h = document.createElement("script");
			h.type = "text/javascript";
			if (YAHOO.env.ua.ie) {
				h.onreadystatechange = function() {
					if (h.readyState == "complete" || h.readyState == "loaded") {
						setTimeout(function() {
							if (f) {
								f.apply(i)
							}
						}, 0)
					}
				}
			} else {
				e.on(h, "load", f, this, true)
			}
			h.src = g;
			document.body.appendChild(h)
		},
		mf_getLoginMailInfo : function() {
			var f = ssn("uin");
			if (f == null || (f && f != this._qqclient.cookie_uin)) {
				document.cookie = "uin=" + this._qqclient.cookie_uin + "; PATH=/; DOMAIN=qq.com;";
				document.cookie = "skey=" + this._qqclient.password + "; PATH=/; DOMAIN=qq.com;"
			}
			this.mf_getRemoteJs(qmail_server_domain + "/cgi-bin/login?fun=passport&target=MLIST&t=login.js&pagesize=10&resp_charset=UTF8&webqq_t=" + (new Date().getTime()), this.mf_checkLoginMail,
					this)
		},
		mf_setMailLoadingStatus : function() {
			var f = this._mail_msg_area_c_el;
			f.innerHTML = "";
			this._mail_count_ref.innerHTML = 0;
			this._mail_count2_ref.innerHTML = 0;
			var g = document.createElement("div");
			c.addClass(g, "noinfo");
			g.innerHTML = '<div class="loading">载入中...</div>';
			f.appendChild(g);
			if (f.childNodes.length > 0) {
				c.setStyle(this._mail_msg_area_h_el, "display", "none")
			}
		},
		mf_checkLoginMail : function() {
			if (Qmail.newMailsList && Qmail.newMailsList.loginType == 0) {
				this.mf_getMail()
			} else {
				this.mf_mailCantLogin()
			}
		},
		mf_mailCantLogin : function() {
			var f = this._mail_msg_area_c_el;
			f.innerHTML = "";
			this._mail_count_ref.innerHTML = 0;
			this._mail_count2_ref.innerHTML = 0;
			if (Qmail.newMailsList && Qmail.newMailsList.nextUrl) {
				var g = document.createElement("div");
				c.addClass(g, "noinfo");
				g.innerHTML = '<div class="weak_tips">您没有开通Qmail，或者您为Qmail设置了独立密码，无法直接读取邮件，您可以<a target="_blank" href="' + Qmail.newMailsList.nextUrl + '">点击此处登录我的QQ邮箱</a></div>';
				f.appendChild(g);
				if (f.childNodes.length > 0) {
					c.setStyle(this._mail_msg_area_h_el, "display", "none")
				}
			}
		},
		mf_getMail : function() {
			this.mf_getRemoteJs(Qmail.newMailsList.nextUrl + "&webqq_t=" + (new Date().getTime()), this.mf_listMail, this)
		},
		mf_msgMouseover : function() {
			c.setStyle(this, "backgroundColor", "#f9fcfe")
		},
		mf_msgMouseout : function() {
			c.setStyle(this, "backgroundColor", "#fff")
		},
		mf_removeThisFromMailList : function(g, h) {
			var f = this.getAttribute("url");
			window.open(f, "_s", "");
			h._mail_msg_area_c_el.removeChild(this);
			h._mail_count_ref.innerHTML = parseInt(h._mail_count_ref.innerHTML) - 1;
			h._mail_count2_ref.innerHTML = parseInt(h._mail_count_ref.innerHTML);
			h._all_msg_count_el.innerHTML = parseInt(h._friend_msg_count_ref.innerHTML) + parseInt(h._class_msg_count_ref.innerHTML) + parseInt(h._mail_count_ref.innerHTML.split("+")[0])
					+ parseInt(this._sysmsg_count_ref.innerHTML);
			if (h._mail_count_ref.innerHTML.indexOf("+") > 0) {
				h._all_msg_count_el.innerHTML = h._all_msg_count_el.innerHTML + "+"
			}
		},
		mf_delayRefreshMailMsg : function(g, h) {
			var f = this.getAttribute("url");
			window.open(f, "_s", "");
			if (h._timer_loadMail) {
				clearTimeout(h._timer_loadMail)
			}
			h._timer_loadMail = setTimeout(function() {
				h.mf_setMailLoadingStatus();
				h.mf_getLoginMailInfo()
			}, 5000)
		},
		mf_listMail : function(p) {
			var l = this._mail_msg_area_c_el;
			l.innerHTML = "";
			if (Qmail.newMailsList && Qmail.newMailsList.from) {
				var g = Qmail.newMailsList.total > 10 ? 10 : Qmail.newMailsList.total;
				var f = Qmail.newMailsList.total > 10 ? "10+" : Qmail.newMailsList.total;
				this._mail_count_ref.innerHTML = f;
				this._mail_count2_ref.innerHTML = f;
				for ( var k = 1; k <= g; k++) {
					var s;
					switch (Qmail.newMailsList.type[k]) {
					case 0:
						s = "mail";
						break;
					case 1:
						s = "system";
						break;
					default:
						break
					}
					var q = Qmail.newMailsList.mailurl[k];
					var t = Qmail.newMailsList.from[k];
					var j = Qmail.newMailsList.title[k];
					var n = Qmail.newMailsList.summary[k];
					var m = Qmail.newMailsList.datetime[k] || "   ";
					var r = document.createElement("div");
					var o = m.split(" ");
					m = o[0] + "&nbsp;&nbsp;&nbsp;" + o[1];
					c.addClass(r, "infos");
					r.setAttribute("url", q);
					r.innerHTML = '<div class="rb">												<div class="rbnr">'
							+ m
							+ '</div>										  </div>										  <div class="lb">												 <div class="userinfo userinfo2">														<div class="ltt">															<div class="imnr">																<span class="webico '
							+ s + '"></span>													<span class="webname">' + t
							+ '</span>															 </div>														</div>														<div class="rtt">															 <div class="rnr rnr2">																 <div>' + j
							+ '<span class="black4"> - ' + n + "</span></div>															 </div>														</div>												  </div>										  </div>";
					e.on(r, "mouseover", this.mf_msgMouseover);
					e.on(r, "mouseout", this.mf_msgMouseout);
					var h = this;
					if (this._mail_count_ref.innerHTML == "10+") {
						e.on(r, "click", h.mf_delayRefreshMailMsg, this)
					} else {
						e.on(r, "click", this.mf_removeThisFromMailList, this)
					}
					l.appendChild(r)
				}
				if (l.childNodes.length == 0) {
					c.setStyle(this._mail_msg_area_h_el, "display", "block")
				} else {
					c.setStyle(this._mail_msg_area_h_el, "display", "none")
				}
			} else {
				var l = this._mail_msg_area_c_el;
				l.innerHTML = "";
				this._mail_count_ref.innerHTML = 0;
				this._mail_count2_ref.innerHTML = 0;
				if (Qmail.newMailsList && Qmail.newMailsList.nextUrl) {
					var r = document.createElement("div");
					c.addClass(r, "noinfo");
					r.innerHTML = '<div class="weak_tips">系统忙，您可以稍后点击“刷新”，或者<a target="_blank" href="' + Qmail.newMailsList.nextUrl + '">点击此处登陆我的QQ邮箱</a></div>';
					l.appendChild(r);
					if (l.childNodes.length > 0) {
						c.setStyle(this._mail_msg_area_h_el, "display", "none")
					}
				}
			}
			this._all_msg_count_el.innerHTML = parseInt(this._friend_msg_count_ref.innerHTML) + parseInt(this._class_msg_count_ref.innerHTML) + parseInt(this._mail_count_ref.innerHTML.split("+")[0])
					+ parseInt(this._sysmsg_count_ref.innerHTML);
			if (this._mail_count_ref.innerHTML.indexOf("+") > 0) {
				this._all_msg_count_el.innerHTML = this._all_msg_count_el.innerHTML + "+"
			}
		},
		mf_refreshBuddyFeeds : function() {
			var h = this._buddys_feeds_el;
			h.innerHTML = "";
			var g = document.createElement("div");
			c.addClass(g, "loading");
			g.innerHTML = "载入中...";
			h.appendChild(g);
			this._loading_flag = true;
			this.mf_loadBuddyFeeds();
			var f = this;
			if (this._timer) {
				clearTimeout(this._timer)
			}
			this._timer = setTimeout(function() {
				f.mf_delayHandle()
			}, 1500)
		},
		mf_delayHandle : function() {
			if (this._loading_flag && this.cache_buddy_feeds) {
				var f = this._buddys_feeds_el;
				f.innerHTML = this.cache_buddy_feeds
			}
		},
		mf_loadBuddyFeeds : function() {
			var f = buddy_situation_server_domain + "/feed/?webqq_t=" + (new Date().getTime());
			var g = ssn("uin");
			if (g == null || (g && g != this._qqclient.cookie_uin)) {
				document.cookie = "uin=" + this._qqclient.cookie_uin + "; PATH=/; DOMAIN=qq.com;";
				document.cookie = "skey=" + this._qqclient.password + "; PATH=/; DOMAIN=qq.com;"
			}
			this.mf_getRemoteJs(f, this.mf_handleBuddyFeeds, this)
		},
		mf_handleBuddyFeeds : function() {
			this._loading_flag = false;
			if (typeof buddyFeeds != "undefined") {
				if (buddyFeeds.retcode == 0) {
					var g = this._buddys_feeds_el;
					g.innerHTML = "";
					if (buddyFeeds.result == "") {
						var y = document.createElement("div");
						c.addClass(y, "weak_tips");
						y.innerHTML = "您还没有收到好友近况。";
						g.appendChild(y)
					} else {
						var q = buddyFeeds.result.ul;
						var x = function(z) {
							z = z || document;
							var A = z.firstChild;
							while (A != null) {
								if (A.nodeType == 3 && !/\S/.test(A.nodeValue)) {
									z.removeChild(A)
								} else {
									if (A.nodeType == 1) {
										x(A)
									}
								}
								A = A.nextSibling
							}
						};
						this._buddyFeedsAmount = 0;
						for ( var t in q) {
							this._buddyFeedsAmount++;
							var y = document.createElement("div");
							c.addClass(y, "infos2 buddy_item_inBuddyState");
							var o = "", m = "", k = "", j = "";
							var u;
							if (q[t].qzone) {
								u = buddyFeeds.result.nowtime - q[t].qzone.time
							} else {
								if (q[t].signature) {
									u = buddyFeeds.result.nowtime - q[t].signature.time
								}
							}
							var n = Math.floor(u / 60);
							var p = Math.floor(u / 3600);
							var r = Math.floor(u / 86400);
							var l = Math.floor(u / 2635200);
							var s = Math.floor(u / 31557600);
							var v = "前";
							if (s >= 1) {
								v = s + "年" + v
							} else {
								if (l >= 1) {
									if (l == 2) {
										l = "两"
									}
									v = l + "个月" + v
								} else {
									if (r >= 1) {
										if (r == 2) {
											r = "两"
										}
										v = r + "天" + v
									} else {
										if (p >= 1) {
											if (p == 2) {
												p = "两"
											}
											v = p + "个小时" + v
										} else {
											if (n >= 1) {
												if (n == 2) {
													n = "两"
												}
												v = n + "分钟" + v
											} else {
												v = "刚刚"
											}
										}
									}
								}
							}
							var w = q[t].uinfo.nick;
							var f = q[t].uinfo.face;
							var i = String(q[t].uinfo.nick);
							if (this._qqclient.bdylist.allUsers[t] && this._qqclient.bdylist.allUsers[t].remark) {
								w = this._qqclient.bdylist.allUsers[t].remark;
								i = String(w + "(" + q[t].uinfo.nick + ")")
							}
							o = '<div class="userinfo userinfo3">										<a class="buddy_avatar_inBuddyState" isOpenChatBox="true" onclick="CHATTY.obj.QQClient.actChat(' + t
									+ ');return false;" title="发起会话...">											<img src="' + face_server_domain + "/cgi/svr/face/getface?type=1&fid=" + f + "&me=" + this._qqclient.uin + "&uin="
									+ t + '" isOpenChatBox="true" width="40" height="40" />										</a>										<div class="rtt">											<div id="buddy_"' + t
									+ ' class="rnr3">												<div class="time">													<span id="feed_buddy_name_' + t
									+ '" class="buddy_name_inBuddyState" isOpenChatBox="true" onclick="CHATTY.obj.QQClient.actChat(' + t + ');return false;" title="' + i.forTitle() + "<" + t + '>">'
									+ i.forHtml() + '</span>													<a class="qzoneicon_in_chatbox" title="进入Qzone!" href="http://user.qzone.qq.com/' + t
									+ '" target="_blank"></a>													<span class="times">' + v + "</span>												</div>";
							if (q[t].qzone) {
								m = '<div class="qzone"><a href="http://' + t
										+ '.qzone.qq.com/" target="_blank" class="qzoneico" title="进入空间"></a>													<span>更新了QQ空间：<a isOpenQzoneBox="true" buddy_uin="' + t
										+ '" onclick="CHATTY.obj.QQClient.mainPanel.mf_show_qzoneBlog(' + t + "," + buddyFeeds.result.ul[t].qzone.time + ",'" + buddyFeeds.result.ul[t].qzone.url
										+ '\');return false;" href="#">' + q[t].qzone.title.forHtml() + '</a></span></div>												<div class="qzonenr">													<span>'
										+ q[t].qzone.content.forHtml() + '</span>													<a isOpenQzoneBox="true" buddy_uin="' + t + '" onclick="CHATTY.obj.QQClient.mainPanel.mf_show_qzoneBlog('
										+ t + "," + buddyFeeds.result.ul[t].qzone.time + ",'" + buddyFeeds.result.ul[t].qzone.url + '\');return false;" href="#">预览>></a>												</div>'
							} else {
								if (q[t].signature) {
									m = '<div class="qzone la_name">更新了个性签名：<font>' + q[t].signature.sig.forHtml() + "</font></div>"
								}
							}
							if (q[t].impression) {
								k = '<div class="qqdt">													<span>好友眼中的【' + w.forHtml() + '】：</span>													<span class="tag">载入中...</span>												</div>'
							} else {
								k = '<div id="buddyImpressions_' + t + '" class="qqdt"></div>'
							}
							j = "</div>										</div>									</div>";
							y.innerHTML = o + m + k + j;
							x(this._message_area_el);
							g.appendChild(y)
						}
						this.mf_getBuddyImpressions()
					}
				} else {
					if (buddyFeeds.retcode == -1) {
					} else {
						if (buddyFeeds.retcode == -2) {
						}
					}
				}
			} else {
				if (this.cache_buddy_feeds) {
					var g = this._buddys_feeds_el;
					g.innerHTML = this.cache_buddy_feeds
				} else {
				}
			}
			if (this._auto_refresh_timer) {
				clearTimeout(this._auto_refresh_timer)
			}
			var h = this;
			this._auto_refresh_timer = setTimeout(function() {
				h.mf_refreshBuddyFeeds()
			}, 1200000)
		},
		mf_setRealnameOfBuddy : function(g, h, f) {
			var i = c.get("feed_buddy_name_" + g);
			var j = c.get("impressions_buddy_name_" + g);
			if (i) {
				i.innerHTML = (h + "(" + f + ")").forHtml();
				i.title = (h + "(" + f + ")<" + g + ">").forTitle()
			}
			if (j) {
				j.innerHTML = h.forHtml()
			}
		},
		mf_getBuddyImpressions : function() {
			var g = "";
			var i = 0;
			for ( var h in buddyFeeds.result.ul) {
				i++;
				g += "&u" + i + "=" + h
			}
			var f = buddy_impression_server_domain + "/app/yx/cgi-bin/get_web_feeds?hc=6&lc=4&c=" + this._buddyFeedsAmount + g + "&webqq_t=" + (new Date().getTime());
			this.mf_getRemoteJs(f, this.mf_handleBuddyImpressions, this)
		},
		mf_handleBuddyImpressions : function() {
			if (typeof data10 == "object" && data10.err == 0) {
				var k = data10;
				var p = k.ul;
				for ( var l = 0; l < p.length; l++) {
					var r = c.get("buddyImpressions_" + p[l].u);
					if (r) {
						var m = '<div><span>好友眼中的【<font id="impressions_buddy_name_' + p[l].u + '">'
								+ ((this._qqclient.bdylist.allUsers[p[l].u] && this._qqclient.bdylist.allUsers[p[l].u].remark) || buddyFeeds.result.ul[p[l].u].uinfo.nick).forHtml()
								+ '</font>】：</span><span class="tag">';
						var h = Math.rand(1, 4);
						for ( var g = 0; g < p[l].el.length; g++) {
							var s = p[l].el[g].ew;
							var v = s.ewToOriginal();
							var f = v.toTitle();
							var o = v.toHtml();
							var q = o;
							var u = v.getCharLength();
							if (u > 14) {
								o = (v.subStringByChar(0, 14) + "…").toHtml();
								q = o
							}
							m += '<span class="cs' + ((g + h) % 4 + 1) + '" title="被这样评价 ' + p[l].el[g].c + " 次：" + f + '">' + q + "</span>"
						}
						m += '</span><a id="Tab1_bewrite_button_el_' + p[l].u + '" href="#" uin="' + p[l].u + '">我来评价</a></div>';
						r.innerHTML = m;
						var n = c.get("Tab1_bewrite_button_el_" + p[l].u);
						e.on(n, "click", this.mf_gotoBewriteBuddy, this);
						c.setStyle(r, "display", "block")
					}
				}
			} else {
			}
			var t = this._buddys_feeds_el;
			this.cache_buddy_feeds = t.innerHTML
		},
		mf_show_qzoneBlog : function(h, i, f) {
			var g = buddy_situation_server_domain + "/qzone/view/u/" + h + "/id/" + i + "/?webqq_t=" + (new Date().getTime());
			this._qzoneBlog_head_el.innerHTML = "最新日志";
			this._qzoneBlog_title_el.href = f;
			this._qzoneBlog_title_el.innerHTML = "";
			this._qzoneBlog_datetime_el.innerHTML = "";
			this._qzoneBlog_content_el.innerHTML = '<div class="loading">载入中...</div>';
			c.setStyle(this._show_qzoneBlog_el, "display", "block");
			this.mf_getRemoteJs(g, this.mf_handelQzoneBlog, this)
		},
		mf_handelQzoneBlog : function() {
			if (qzoneBlog && qzoneBlog.retcode == 0) {
				this._qzoneBlog_title_el.innerHTML = qzoneBlog.result.title;
				var h = new Date();
				h.setTime(parseInt(qzoneBlog.result.time) * 1000);
				this._qzoneBlog_datetime_el.innerHTML = h.format("yyyy年MM月dd日");
				try {
					var f = ubbReplace(qzoneBlog.result.content.convSP().convCR(), "all", null, null, qzone_imgcache_server_domain);
					this._qzoneBlog_content_el.innerHTML = f
				} catch (g) {
					this._qzoneBlog_content_el.innerHTML = "暂不支持Flash及视频查看，你可以点击文章标题去Qzone查看。"
				}
			} else {
				alert("获取日志内容出错！")
			}
		},
		mf_hide_qzoneBlog : function(f) {
			e.stopPropagation(f);
			c.setStyle(this._show_qzoneBlog_el, "display", "none")
		},
		mf_close_qzoneBlog : function(f) {
			e.stopEvent(f);
			c.setStyle(this._show_qzoneBlog_el, "display", "none")
		},
		mf_loadMyBuddyImpression : function() {
			var f = buddy_impression_server_domain + "/app/yx/cgi-bin/show_mel?hc=8&lc=4&time=" + ((new Date()).getTime());
			this._impression_of_my_el.innerHTML = '<div class="loading">载入中...</div>';
			this.mf_getRemoteJs(f, this.mf_handleMyBuddyImpression, this)
		},
		mf_handleMyBuddyImpression : function() {
			if (typeof data2 == "object" && data2.err == 0) {
				var W = data2;
				this._impression_of_my_el.innerHTML = "";
				if (W.el == 0) {
					c.setStyle(this._impression_of_my_el, "height", "50px");
					var C = document.createElement("div");
					C.innerHTML = "<span>还没有好友对你进行评价，你可以先去评价下面的好友。</span>";
					c.addClass(C, "noys");
					this._impression_of_my_el.appendChild(C)
				} else {
					c.setStyle(this._impression_of_my_el, "height", "350px");
					var F = [ "#406ec3", "#e97238", "#00998a", "#4646be", "#e050c3", "#66b82b", "#0b6795", "#00998a", "#ef8a58", "#c45454", "#44c2b6", "#0185c7" ];
					var u = [ [ 184, 66 ], [ 177, 116 ], [ 71, 127 ], [ 56, 75 ], [ 70, 25 ], [ 172, 2 ], [ 270, 10 ], [ 285, 58 ], [ 279, 106 ], [ 275, 155 ], [ 172, 169 ], [ 76, 172 ] ];
					var k = [ -50, -29 ];
					var q = document.createElement("label");
					q.innerHTML = "大家对我的印象是:";
					c.addClass(q, "label01");
					this._impression_of_my_el.appendChild(q);
					var Z = document.createElement("div");
					c.addClass(Z, "impressionListOfMe");
					this._impression_of_my_el.appendChild(Z);
					var f = 38;
					var L = 14;
					for ( var U = 0; U < W.el.length; U++) {
						var J = W.el[U].ew;
						var R = J.ewToOriginal();
						var Q = R.toTitle();
						var y = R.getCharLength();
						var D = "";
						var z = "12px";
						var t = 0;
						if (y <= 4) {
							z = "30px"
						} else {
							if (y <= 8) {
								z = "20px"
							} else {
								if (y <= 12) {
									z = "14px"
								} else {
									z = "12px"
								}
							}
						}
						if (y <= L) {
							D = R.toHtml();
							t = 2
						} else {
							if (y <= (L * 2)) {
								var H = Math.ceil(y / 2);
								D = R.subStringByChar(0, H).toHtml() + "<br />" + R.subStringByChar(H).toHtml();
								t = 1
							} else {
								if (y <= f) {
									var H = Math.ceil(y / 3);
									D = R.subStringByChar(0, H).toHtml() + "<br />" + R.subStringByChar(H, (H * 2)).toHtml() + "<br />" + R.subStringByChar(H * 2).toHtml();
									t = 0
								} else {
									var P = R.subStringByChar(0, f) + "...";
									var O = P.getCharLength();
									var H = Math.ceil(O / 3);
									D = P.subStringByChar(0, H).toHtml() + "<br />" + P.subStringByChar(H, (H * 2)).toHtml() + "<br />" + P.subStringByChar(H * 2).toHtml();
									t = 0
								}
							}
						}
						var v = document.createElement("a");
						c.addClass(v, "impressionListItemA" + t);
						c.setStyle(v, "cursor", "default");
						c.setStyle(v, "position", "absolute");
						v.setAttribute("href", "#");
						Z.appendChild(v);
						var Y = document.createElement("span");
						c.addClass(Y, "ew");
						c.setStyle(Y, "fontSize", z);
						Y.setAttribute("eid", W.el[U].eid);
						Y.setAttribute("ew", W.el[U].ew);
						Y.setAttribute("ewInDb", W.el[U].EW);
						Y.innerHTML = D;
						v.appendChild(Y);
						var p = document.createElement("span");
						c.addClass(p, "span_right");
						p.setAttribute("title", "删除此印象");
						v.appendChild(p);
						var x = document.createElement("span");
						c.addClass(x, "delete" + t);
						p.appendChild(x);
						e.on(p, "click", this.mf_removeThisMyBuddyImpression, this);
						c.setStyle(v, "left", (u[U][0] - (v.offsetWidth / 2)) + "px");
						c.setStyle(v, "top", u[U][1] + "px");
						var G = "";
						if (W.el[U].ul) {
							var V = W.el[U].ul.length - 1;
							for ( var T = V; T > 0; T--) {
								var X = (W.el[U].ul[T].n && W.el[U].ul[T].n.trim() != "") ? W.el[U].ul[T].n : W.el[U].ul[T].u;
								G += X + "、"
							}
							G += (W.el[U].ul[0].n && W.el[U].ul[0].n.trim() != "") ? W.el[U].ul[0].n : W.el[U].ul[0].u
						}
						if (G.length > 150) {
							G = G.substring(0, 149) + "..."
						}
						var C = document.createElement("div");
						c.setStyle(C, "display", "none");
						document.body.appendChild(C);
						C.innerHTML = G;
						G = C.innerText ? C.innerText : C.textContent;
						var N = 1;
						if (W.el[U].ul == 0) {
							if (W.el[U].cn) {
								N = W.el[U].cn
							}
							v.setAttribute("title", "被这样描述 " + N + " 次：" + R)
						} else {
							v.setAttribute("title", G + " 这样描述我：" + R)
						}
						if (U < F.length) {
							c.setStyle(Y, "color", F[U])
						} else {
							c.setStyle(Y, "color", F[A - 1])
						}
					}
					var w = document.createElement("ul");
					c.addClass(w, "feedList");
					this._impression_of_my_el.appendChild(w);
					var S = W.el;
					BubbleSort(S, "ts");
					var A = (S.length > 4 ? 4 : S.length);
					for ( var U = 0; U < A; U++) {
						var n;
						var K = (new Date().getTime() / 1000);
						var K = W.sct;
						n = K - S[U].ts;
						var M = Math.floor(n / 60);
						var I = Math.floor(n / 3600);
						var o = Math.floor(n / 86400);
						var l = Math.floor(n / 2635200);
						var B = Math.floor(n / 31557600);
						var h = "前";
						if (B >= 1) {
							h = B + "年" + h
						} else {
							if (l >= 1) {
								if (l == 2) {
									l = "两"
								}
								h = l + "个月" + h
							} else {
								if (o >= 1) {
									if (o == 2) {
										o = "两"
									}
									h = o + "天" + h
								} else {
									if (I >= 1) {
										if (I == 2) {
											I = "两"
										}
										h = I + "个小时" + h
									} else {
										if (M >= 1) {
											if (M == 2) {
												M = "两"
											}
											h = M + "分钟" + h
										} else {
											h = n + "秒" + h
										}
									}
								}
							}
						}
						if (S[U].ul != 0) {
							var m = document.createElement("li");
							c.addClass(m, "feedListItem" + (U % 2));
							var s = S[U].ul[0];
							var J = S[U].ew;
							var R = J.ewToOriginal();
							var Q = R.toTitle();
							var r = R.toHtml();
							var E = r;
							var g = R.getCharLength();
							if (g > 16) {
								r = (R.subStringByChar(0, 16) + "...").toHtml();
								E = r
							}
							var X = (s.n && s.n.trim() != "") ? s.n : s.u;
							m.innerHTML = '<a id="impression_feed_link_id_' + U + "_" + s.u + '" class="link01" href="#" uin="' + s.u + '" title="描述' + X + '">' + X
									+ '</a>&nbsp;<span class="feed_time">' + h + '描述了我:</span>&nbsp;<span class="feed_word">' + E + "</span>";
							w.appendChild(m);
							e.on(c.get("impression_feed_link_id_" + U + "_" + s.u), "click", this.mf_gotoBewriteBuddy, this)
						}
					}
				}
			}
		},
		mf_removeThisMyBuddyImpression : function(i, k) {
			var f = this.previousSibling.getAttribute("ewInDb").ewToOriginal();
			var j = this.previousSibling.getAttribute("ew").ewToOriginal();
			var h = this.previousSibling.getAttribute("eid");
			if (confirm("确认删除印象词【" + j + "】吗？")) {
				var g = buddy_impression_server_domain + "/app/yx/cgi-bin/del_e?eid=" + h + "&EW=" + (f) + "&time=" + ((new Date()).getTime());
				k.mf_getRemoteJs(g, k.mf_handleRemoveMyBuddyImpression, k)
			}
		},
		mf_handleRemoveMyBuddyImpression : function() {
			if (typeof data5 == "object" && data5.err == 0) {
				this.mf_loadMyBuddyImpression();
				alert("删除成功！")
			} else {
				alert("删除失败！")
			}
		},
		mf_loadImpressionOfBuddy : function(g) {
			var f = buddy_impression_server_domain + "/app/yx/cgi-bin/show_fel?d=" + g + "&hc=8&lc=4&time=" + ((new Date()).getTime());
			this.mf_getRemoteJs(f, this.mf_handleImpressionOfBuddy, this)
		},
		mf_handleImpressionOfBuddy : function() {
			if (typeof data3 == "object" && data3.err == 0) {
				var A = data3;
				var g = A.d;
				var j = c.get("ImpressionOfBuddyItem_el_" + g);
				if (j) {
					try {
						c.replaceClass(j, "infos4", "infos3")
					} catch (w) {
					}
					var n = c.get("Tab3_bewrite_button_el_" + g);
					n.innerHTML = "";
					var y = document.createElement("a");
					y.href = "#";
					y.setAttribute("uin", g);
					e.on(y, "click", this.mf_toBewriteBuddy, this);
					y.innerHTML = "我来评价";
					n.appendChild(y)
				} else {
					j = document.createElement("div");
					j.id = "ImpressionOfBuddyItem_el_" + g;
					c.addClass(j, "infos");
					c.addClass(j, "infos3");
					this._impression_of_buddy_el.appendChild(j);
					var u = document.createElement("div");
					c.addClass(u, "rb");
					var z = document.createElement("div");
					z.id = "Tab3_bewrite_button_el_" + g;
					c.addClass(z, "rbnr");
					var y = document.createElement("a");
					y.href = "#";
					y.setAttribute("uin", g);
					e.on(y, "click", this.mf_toBewriteBuddy, this);
					y.innerHTML = "我来评价";
					z.appendChild(y);
					u.appendChild(z);
					j.appendChild(u);
					var o = document.createElement("div");
					c.addClass(o, "lb");
					var q = (this._qqclient.bdylist.allUsers[String(g)] && this._qqclient.bdylist.allUsers[String(g)].remark != "") ? this._qqclient.bdylist.allUsers[String(g)].remark : A.n;
					var l = '<div class="userinfo userinfo2">								<div class="ltt">									<div class="imnr">										<span class="webico"><img src="' + face_server_domain
							+ "/cgi/svr/face/getface?type=1&fid=0&me=" + this._qqclient.uin + "&uin=" + g + '" alt="" /></span>										<span class="webname" title="' + q + "<" + g + '>">' + q
							+ '</span>									</div>								</div>								<div class="rtt">									<div id="TAB3_impression_of_buddy_el_' + g
							+ '" class="rnr height3">									</div>								 </div>							</div>';
					o.innerHTML = l;
					j.appendChild(o)
				}
				var s = c.get("TAB3_impression_of_buddy_el_" + g);
				var m = '<div class="tag">';
				if (A.el == 0) {
					m += "暂无印象评价"
				} else {
					var p = Math.rand(1, 4);
					for ( var t = 0; t < A.el.length; t++) {
						var v = A.el[t].ew;
						var f = v.ewToOriginal();
						var k = f.toTitle();
						var h = f.toHtml();
						var r = h;
						var x = f.getCharLength();
						if (x > 14) {
							h = (f.subStringByChar(0, 14) + "…").toHtml();
							r = h
						}
						m += '<span class="cs' + ((t + p) % 4 + 1) + '" title="被这样评价 ' + A.el[t].c + " 次：" + k + '">' + r + "</span>"
					}
				}
				m += "</div>";
				s.innerHTML = m
			}
		},
		mf_refreshImpressionOfBuddys : function() {
			this.mf_loadMyBuddyImpression();
			var g = this._impression_of_buddy_el;
			g.innerHTML = "";
			var f = document.createElement("div");
			c.addClass(f, "loading");
			f.innerHTML = "载入中...";
			g.appendChild(f);
			this.mf_loadAllImpressionsOfBuddys(this._qqclient.bdylist.friendList.uins)
		},
		mf_loadAllImpressionsOfBuddys : function(m) {
			this._allUinsArr = m;
			var k = [];
			var f = 50;
			var l = m.length;
			for ( var h = 0; h < l; h++) {
				if (this._qqclient.bdylist.allUsers[m[h]].remark != "") {
					k.push(m[h]);
					if (k.length == f) {
						break
					}
				} else {
					if (this._qqclient.bdylist.allUsers[m[h]].stat != 20) {
						k.push(m[h]);
						if (k.length == f) {
							break
						}
					}
				}
			}
			l = (m.length < f) ? m.length : f;
			if (k.length < f) {
				var n = false;
				for ( var h = 0; h < m.length; h++) {
					for ( var g = k.length; g < l; g++) {
						if (k[g] == m[h]) {
							n = true
						}
					}
					if (n === false) {
						k.push(m[h])
					}
					if (k.length == f) {
						break
					}
				}
			}
			this._impressionBuddysUinsArr = k;
			this.mf_loadImpressionsOfBuddys(k)
		},
		mf_loadImpressionsOfBuddys : function(j) {
			var h = "";
			if (j.length > 0) {
				for ( var g = 0; g < j.length; g++) {
					h += "&u" + (g + 1) + "=" + j[g]
				}
				var f = buddy_impression_server_domain + "/app/yx/cgi-bin/get_web_feeds?hc=6&lc=4&c=" + j.length + h + "&time=" + ((new Date()).getTime());
				this.mf_getRemoteJs(f, this.mf_handleImpressionsOfBuddys, this)
			} else {
				this._impression_of_buddy_el.innerHTML = ""
			}
		},
		mf_handleImpressionsOfBuddys : function() {
			if (typeof data10 == "object" && data10.err == 0) {
				var E = data10;
				var o = E.ul;
				this._impression_of_buddy_el.innerHTML = "";
				for ( var w = 0; w < this._impressionBuddysUinsArr.length; w++) {
					var g = this._impressionBuddysUinsArr[w];
					var k = c.get("ImpressionOfBuddyItem_el_" + g);
					if (k) {
						try {
							c.replaceClass(k, "infos4", "infos3")
						} catch (A) {
						}
						var q = c.get("Tab3_bewrite_button_el_" + g);
						q.innerHTML = "";
						var C = document.createElement("a");
						C.href = "#";
						C.setAttribute("uin", g);
						e.on(C, "click", this.mf_toBewriteBuddy, this);
						C.innerHTML = "我来评价";
						q.appendChild(C)
					} else {
						k = document.createElement("div");
						k.id = "ImpressionOfBuddyItem_el_" + g;
						c.addClass(k, "infos");
						c.addClass(k, "infos3");
						this._impression_of_buddy_el.appendChild(k);
						var y = document.createElement("div");
						c.addClass(y, "rb");
						var D = document.createElement("div");
						D.id = "Tab3_bewrite_button_el_" + g;
						c.addClass(D, "rbnr");
						var C = document.createElement("a");
						C.href = "#";
						C.setAttribute("uin", g);
						e.on(C, "click", this.mf_toBewriteBuddy, this);
						C.innerHTML = "我来评价";
						D.appendChild(C);
						y.appendChild(D);
						k.appendChild(y);
						var s = document.createElement("div");
						c.addClass(s, "lb");
						var t = (this._qqclient.bdylist.allUsers[String(g)]) ? (this._qqclient.bdylist.allUsers[String(g)].remark || this._qqclient.bdylist.allUsers[String(g)].nick) : String(g);
						var m = '<div class="userinfo userinfo2">									<div class="ltt">										<div class="imnr">											<span class="webico"><img src="' + face_server_domain
								+ "/cgi/svr/face/getface?type=1&fid=0&me=" + this._qqclient.uin + "&uin=" + g + '" alt="" /></span>											<span class="webname" title="' + t.forTitle() + "<" + g
								+ '>">' + t.forHtml() + '</span>										</div>									</div>									<div class="rtt">										<div id="TAB3_impression_of_buddy_el_' + g
								+ '" class="rnr height3">										</div>									 </div>								</div>';
						s.innerHTML = m;
						k.appendChild(s)
					}
					var x = c.get("TAB3_impression_of_buddy_el_" + g);
					var n = '<div class="tag">';
					var p = false;
					for ( var v = 0; v < o.length; v++) {
						if (this._impressionBuddysUinsArr[w] == o[v].u) {
							p = v
						}
					}
					if (p !== false && o[p].el != 0) {
						var r = Math.rand(1, 4);
						for ( var v = 0; v < o[p].el.length; v++) {
							var z = o[p].el[v].ew;
							var f = z.ewToOriginal();
							var l = f.toTitle();
							var h = f.toHtml();
							var u = h;
							var B = f.getCharLength();
							if (B > 14) {
								h = (f.subStringByChar(0, 14) + "…").toHtml();
								u = h
							}
							n += '<span class="cs' + ((v + r) % 4 + 1) + '" title="' + l + '">' + u + "</span>"
						}
					} else {
						n += "暂无印象评价"
					}
					n += "</div>";
					x.innerHTML = n
				}
			}
		},
		mf_toBewriteBuddy : function(j, f) {
			var g = e.getTarget(j);
			var i = g.getAttribute("uin");
			var h = buddy_impression_server_domain + "/app/yx/cgi-bin/get_t?d=" + i + "&time=" + ((new Date()).getTime());
			f.mf_getRemoteJs(h, f.mf_testBewriteDate, f)
		},
		mf_testBewriteDate : function() {
			if (typeof data9 == "object" && data9.err == 0) {
				var h = data9;
				var f = h.d;
				var k = "TA";
				if (h.g == 1) {
					k = "她"
				} else {
					if (h.g == 0) {
						k = "他"
					}
				}
				var l = h.ew;
				var n = l.ewToOriginal();
				var j = l.toHtml();
				var m = c.get("ImpressionOfBuddyItem_el_" + f);
				var i = Math.ceil(h.lvt / 60 / 60 / 24) - Math.ceil(h.sct / 60 / 60 / 24);
				if (i <= 0) {
					var g = buddy_impression_server_domain + "/app/yx/cgi-bin/download?d=" + f + "&c=17&time=" + ((new Date()).getTime());
					this.mf_getRemoteJs(g, this.mf_handleLoadBwriteImpression, this)
				} else {
					if (i == 1) {
						if (m) {
							this._message_area_el.scrollTop = (c.getY(m) + this._message_area_el.scrollTop) - 135
						}
						alert("你对" + k + "的印象是：\n\n　　【" + n + "】\n\n明天才能给" + k + "添加新印象，你可以先去评价其他人！")
					} else {
						if (i >= 2) {
							if (m) {
								this._message_area_el.scrollTop = (c.getY(m) + this._message_area_el.scrollTop) - 135
							}
							alert("你对" + k + "的印象是：\n\n　　【" + n + "】\n\n后天才能给" + k + "添加新印象，你可以先去评价其他人！")
						}
					}
				}
			}
		},
		mf_handleLoadBwriteImpression : function() {
			if (typeof data8 == "object") {
				if (data8.err == 0) {
					var R = data8;
					var g = R.d;
					var v = "TA";
					var n = [ [ 109, 72 ], [ 195, 60 ], [ 252, 75 ], [ 87, 107 ], [ 161, 90 ], [ 259, 97 ], [ 144, 128 ], [ 215, 118 ], [ 263, 131 ], [ 119, 165 ], [ 190, 149 ], [ 215, 173 ],
							[ 256, 188 ], [ 138, 188 ], [ 88, 226 ], [ 178, 210 ], [ 262, 226 ] ];
					var j = [ -20, -29 ];
					var s = [ 30, 24, 22, 18, 15, 20, 18, 16, 15, 14, 13, 12 ];
					var B = function() {
						this.style.zIndex = 100;
						this.style.fontSize = "16px";
						this.style.fontWeight = "bold";
						this.style.cursor = "pointer";
						var i = this.className.split("_off ");
						this.className = i[0] + "_on " + i[1]
					};
					var O = function() {
						this.style.zIndex = 0;
						this.style.fontSize = "14px";
						this.style.fontWeight = "normal";
						var i = this.className.split("_on ");
						this.className = i[0] + "_off " + i[1]
					};
					if (R.g == 1) {
						v = "她"
					} else {
						if (R.g == 0) {
							v = "他"
						}
					}
					var w = c.get("ImpressionOfBuddyItem_el_" + g);
					if (w) {
						try {
							c.replaceClass(w, "infos3", "infos4")
						} catch (P) {
						}
						var M = c.get("Tab3_bewrite_button_el_" + g)
					} else {
						w = document.createElement("div");
						w.id = "ImpressionOfBuddyItem_el_" + g;
						c.addClass(w, "infos");
						c.addClass(w, "infos4");
						this._impression_of_buddy_el.insertBefore(w, this._impression_of_buddy_el.firstChild);
						var t = document.createElement("div");
						c.addClass(t, "rb");
						var r = document.createElement("div");
						r.id = "Tab3_bewrite_button_el_" + g;
						c.addClass(r, "rbnr");
						t.appendChild(r);
						w.appendChild(t);
						var f = document.createElement("div");
						c.addClass(f, "lb");
						var H = (this._qqclient.bdylist.allUsers[String(g)] && this._qqclient.bdylist.allUsers[String(g)].remark != "") ? this._qqclient.bdylist.allUsers[String(g)].remark : R.n;
						var E = '<div class="userinfo userinfo2">									<div class="ltt">										<div class="imnr">											<span class="webico"><img src="' + face_server_domain
								+ "/cgi/svr/face/getface?type=1&fid=0&me=" + this._qqclient.uin + "&uin=" + g + '" alt="" /></span>											<span class="webname">' + H
								+ '</span>										</div>									</div>									<div class="rtt">										<div id="TAB3_impression_of_buddy_el_' + g
								+ '" class="rnr height3">										</div>									 </div>								</div>';
						f.innerHTML = E;
						w.appendChild(f)
					}
					var C = c.get("TAB3_impression_of_buddy_el_" + g);
					var y = '	<div class="rnr rnr2 qiangzhi_kuandu">								<div id="bewrite_impression_list_'
							+ g
							+ '" class="yslist">加载中...</div>								<div class="inputlist">									<div>以上都不是我想说的， 让我自己输入吧：</div>									<div class="button">										<input id="Tab3_buddyImpression_input_ew_el_'
							+ g + '" uin="' + g + '" type="text" maxlength="100" />										<a id="Tab3_buddyImpression_ok_button_el_' + g + '" uin="' + g
							+ '" href="#">确定</a>										<a id="Tab3_buddyImpression_cancel_button_el_' + g + '" uin="' + g + '" href="#">取消</a>									</div>								</div>							</div>';
					C.innerHTML = y;
					var m = c.get("Tab3_buddyImpression_input_ew_el_" + g);
					e.on(m, "keyup", this.mf_checkImpressionInput, this);
					e.on(m, "keydown", this.mf_enterImpressionInput, this);
					var u = c.get("Tab3_buddyImpression_ok_button_el_" + g);
					e.on(u, "click", this.mf_addImpressionInput, this);
					var z = c.get("Tab3_buddyImpression_cancel_button_el_" + g);
					e.on(z, "click", this.mf_toViewBuddyImpression, this);
					this._message_area_el.scrollTop = (c.getY(w) + this._message_area_el.scrollTop) - 135;
					var k = c.get("bewrite_impression_list_" + g);
					var A = (R.n && R.n.trim() != "") ? R.n : R.d;
					var H = this._qqclient.bdylist.allUsers[String(g)].remark || A;
					var y = "请选择你对【" + H + "】的印象:";
					k.innerHTML = y;
					var T = document.createElement("div");
					c.addClass(T, "impressionList");
					k.appendChild(T);
					var q = 0;
					if (R.el != 0) {
						q = R.el.length
					}
					var h = 37;
					var G = 20;
					for ( var N = 0; N < q; N++) {
						var F = R.el[N].ew;
						var L = F.ewToOriginal();
						var K = L.toTitle();
						var p = L.getCharLength();
						var y = "";
						var o = document.createElement("a");
						T.appendChild(o);
						var Q = N % 10 + 1;
						var l = Math.ceil(Math.random() * 2);
						c.setStyle(o, "position", "absolute");
						e.on(o, "mouseover", B);
						e.on(o, "mouseout", O);
						o.setAttribute("uin", g);
						o.setAttribute("href", "#");
						o.setAttribute("title", "此印象全文：" + L);
						e.on(o, "click", this.mf_addThis, this);
						e.on(o, "focus", function() {
							this.blur()
						}, this);
						var x = document.createElement("span");
						x.setAttribute("eid", R.el[N].eid);
						x.setAttribute("ew", R.el[N].ew);
						if (p <= 6) {
							l = 4
						} else {
							if (p <= 14) {
								l = 3
							} else {
								if (p <= G) {
									l = 2
								} else {
									l = 1
								}
							}
						}
						c.addClass(o, "size" + l);
						if (p <= G) {
							c.addClass(o, "impressionListItemB_" + Q + "_off");
							y = L.toHtml()
						} else {
							if (p <= h) {
								c.addClass(o, "impressionListItem" + Q + "_off");
								var D = Math.ceil(p / 2);
								y = L.subStringByChar(0, D).toHtml() + "<br />" + L.subStringByChar(D).toHtml()
							} else {
								c.addClass(o, "impressionListItem" + Q + "_off");
								var J = L.subStringByChar(0, h) + "...";
								var I = J.getCharLength();
								var D = Math.ceil(I / 2);
								y = J.subStringByChar(0, D).toHtml() + "<br />" + J.subStringByChar(D).toHtml()
							}
						}
						c.addClass(o, "link02");
						x.innerHTML = y;
						o.appendChild(x);
						c.setStyle(o, "left", j[0] + parseInt(n[N][0] * 0.8) - (o.offsetWidth / 2) + "px");
						c.setStyle(o, "top", j[1] + parseInt(n[N][1] * 1.3) - (o.offsetHeight / 2) + "px")
					}
				} else {
					if (data8.err == 1011) {
						alert("此人已经不在你的好友列表中，无法评价印象！")
					}
				}
			}
			var U = c.get("Tab3_bewrite_button_el_" + g);
			if (U) {
				U.innerHTML = "";
				var S = document.createElement("a");
				S.href = "#";
				S.setAttribute("uin", g);
				e.on(S, "click", this.mf_toViewBuddyImpression, this);
				S.innerHTML = "取消评价";
				U.appendChild(S)
			}
		},
		mf_addThis : function(h, f) {
			var g = this.firstChild.getAttribute("eid") || 0;
			f.mf_addImpression(this.getAttribute("uin"), this.firstChild.getAttribute("ew").ewToOriginal(), g)
		},
		mf_checkImpressionInput : function(h, f, j) {
			j = j || this;
			var i = j.value;
			var g = i.getCharLength();
			if (g > 100) {
				j.value = i.cutRight(1);
				f.mf_checkImpressionInput(h, f, j)
			}
		},
		mf_enterImpressionInput : function(j, f) {
			j = e.getEvent(j);
			var g = e.getCharCode(j) || 0;
			if (g == 13) {
				var i = this.getAttribute("uin");
				var h = this.value.toString().trim();
				if (h == "") {
					alert("请填写评价内容！")
				} else {
					f.mf_addImpression(i, h, 0)
				}
			}
		},
		mf_addImpressionInput : function(j, g) {
			var i = this.getAttribute("uin");
			var f = c.get("Tab3_buddyImpression_input_ew_el_" + i);
			var h = f.value.toString().trim();
			if (h == "") {
				alert("请填写评价内容！")
			} else {
				g.mf_addImpression(i, h, 0)
			}
		},
		mf_addImpression : function(i, h, f) {
			f = f || 0;
			var g = buddy_impression_server_domain + "/app/yx/cgi-bin/add_e?d=" + i + "&eid=" + f + "&ew=" + encodeURIComponent(h) + "&time=" + ((new Date()).getTime());
			this.mf_getRemoteJs(g, this.mf_handleAddImpressionOK, this)
		},
		mf_handleAddImpressionOK : function() {
			if (typeof data6 == "object" && data6.err == 0) {
				var g = data6;
				var f = g.d;
				alert("评价成功！");
				this.mf_loadImpressionOfBuddy(f)
			} else {
				alert("评价未成功，请检查填写内容！")
			}
		},
		mf_toViewBuddyImpression : function(k, f) {
			var h = e.getTarget(k);
			var i = h.getAttribute("uin");
			var j = c.get("ImpressionOfBuddyItem_el_" + i);
			if (j) {
				try {
					c.replaceClass(j, "infos4", "infos3")
				} catch (l) {
				}
				var g = c.get("TAB3_impression_of_buddy_el_" + i);
				g.innerHTML = '<div class="loading">载入中...</div>'
			}
			f.mf_loadImpressionOfBuddy(i)
		},
		mf_gotoBewriteBuddy : function(h, f) {
			e.stopEvent(h);
			var g = this.getAttribute("uin");
			f.mainTab.select( {
				trigger : f._buddys_impressions_tab_head_el,
				sheet : f._buddys_impressions_el
			});
			f.mf_toBewriteBuddy(h, f)
		},
		mf_updateImpression : function(h) {
			var f = buddy_impression_server_domain + "/app/yx/cgi-bin/show_fel?d=" + h + "&hc=8&lc=4&time=" + ((new Date()).getTime());
			var g = c.get("Main_mainwindow_friend_impression");
			g.setAttribute("uin", h);
			g.innerHTML = "";
			this.mf_getRemoteJs(f, this.mf_handleUpdateImpression, this)
		},
		mf_handleUpdateImpression : function() {
			if (typeof data3 == "object" && data3.err == 0) {
				var l = data3;
				var g = l.d;
				var p = c.get("Main_mainwindow_friend_impression");
				var v = parseInt(p.getAttribute("uin"));
				if (g == v) {
					if (p) {
						var h = document.createElement("div");
						var n = '<div class="userys">';
						if (l.el == 0) {
							n += '	<span>暂无印象评价</span>								<span id="buddyTips_bewrite_button_outer"></span>'
						} else {
							var k = Math.rand(1, 4);
							for ( var m = 0; m < l.el.length; m++) {
								var r = l.el[m].ew;
								var u = r.ewToOriginal();
								var j = u.toTitle();
								var o = u.toHtml();
								var q = o;
								var t = u.getCharLength();
								if (t > 14) {
									o = (u.subStringByChar(0, 14) + "…").toHtml();
									q = o
								}
								n += '<span class="as' + ((m + k) % 4 + 1) + '" title="被这样评价 ' + l.el[m].c + " 次：" + j + '">' + q + "</span>"
							}
							n += '<span id="buddyTips_bewrite_button_outer"></span>'
						}
						n += "	</div>";
						p.innerHTML = n;
						var s = c.get("buddyTips_bewrite_button_outer");
						s.innerHTML = "";
						var f = document.createElement("a");
						f.href = "#";
						c.addClass(f, "otheras");
						f.setAttribute("uin", g);
						f.title = g;
						e.on(f, "click", this.mf_gotoBewriteBuddy, this);
						f.innerHTML = "我来评价";
						s.appendChild(f)
					}
				}
				this.resetUserCardPosition(this._currentUserCardEl)
			}
		},
		mf_ShowFace : function(g) {
			var f = e.fromEle(g);
			var i = c.getX(f) - 2;
			var h = c.getY(f) - 220;
			this._face_panel_ref.style.left = i + "px";
			this._face_panel_ref.style.top = h + "px";
			this._face_panel_ref.style.display = "block";
			e.on(window.document, "mousedown", this.mf_FaceHide, this, true);
			e.stopEvent(g)
		},
		mf_FaceHide : function() {
			this._face_panel_ref.style.display = "none";
			e.removeListener(window.document, "mousedown", this.mf_FaceHide)
		},
		mf_OpenFriend : function(h) {
			var f = this._search_target.id || "";
			if (f.indexOf("search_") >= 0) {
				var g = f.substr(f.indexOf("search_") + 7);
				this.mf_act_chat_with(g, false)
			}
		},
		mf_SearchInputMouseOut : function(g) {
			for ( var f = 0; f < this._search_panel_ref.childNodes.length; f++) {
				this._search_panel_ref.childNodes[f].className = "search-menus"
			}
		},
		UP : 38,
		DOWN : 40,
		ENTER : 13,
		mf_SearchFriend : function(p) {
			var n = String(this._search_input_el.value).replace(/(^\s|\s$)/gi, "").toUpperCase();
			if (n != "" && n != "搜索用户或群组" && e.getCharCode(p) != this.ENTER && e.getCharCode(p) != this.DOWN && e.getCharCode(p) != this.UP) {
				if (n.length) {
					this._search_panel_ref.innerHTML = "";
					var g = this._qqclient.bdylist.allUsers, k = this._qqclient.bdylist.allClasses;
					var m = 0;
					for ( var h in g) {
						var l = g[h];
						if ((l.group_id > -1) && (String(h).indexOf(n) > -1 || String(l.nick).toUpperCase().indexOf(n) > -1 || String(l.remark).toUpperCase().indexOf(n) > -1)) {
							var j = document.createElement("A");
							j.href = "#";
							j.className = "search-menus";
							j.innerHTML = "<span>" + String(l.remark ? l.remark + "(" + l.nick + ")" : l.nick).forHtml() + "</span><span>(" + h + ")</span>";
							if (m == 0) {
								this._search_target = j
							}
							j.id = "search_" + h;
							this._search_panel_ref.appendChild(j);
							e.on(j, "mousedown", this.mf_ChatWithUser, this, true);
							m++;
							if (m == 5) {
								break
							}
						}
					}
					if (m < 5) {
						for ( var q in k) {
							var o = k[q], f = o.code;
							if (String(f).indexOf(n) > -1 || String(o.name).toUpperCase().indexOf(n) > -1) {
								var j = document.createElement("A");
								j.href = "#";
								j.className = "search-menus";
								j.innerHTML = "<span>" + o.name + "</span><span>(" + f + ")</span>";
								if (m == 0) {
									this._search_target = j
								}
								j.id = "search_" + q;
								this._search_panel_ref.appendChild(j);
								e.on(j, "mousedown", this.mf_ChatWithUser, this, true);
								m++;
								if (m == 5) {
									break
								}
							}
						}
					}
					if (m == 0) {
						var j = document.createElement("A");
						j.innerHTML = "未找到符合好友";
						this._search_panel_ref.appendChild(j)
					}
				}
				this.mf_ShowSearch()
			} else {
				switch (e.getCharCode(p)) {
				case this.ENTER:
					this.mf_OpenFriend();
					this.mf_SearchHide();
					break;
				case this.DOWN:
					if (this._search_target) {
						this._search_target.className = "search-menus";
						this._search_target = this._search_target.nextSibling || this._search_panel_ref.firstChild;
						this._search_target.className = "search-menus target";
						this.mf_ShowSearch()
					}
					break;
				case this.UP:
					if (this._search_target) {
						this._search_target.className = "search-menus";
						this._search_target = this._search_target.previousSibling || this._search_panel_ref.lastChild;
						this._search_target.className = "search-menus target";
						this.mf_ShowSearch()
					}
					break;
				default:
					break
				}
			}
		},
		mf_ShowSearch : function() {
			var f = c.getClientHeight();
			var h = "tl", g = "bl";
			if (this._search_target) {
				this._search_target.className = "search-menus target"
			}
			this._search_panel_ref.style.display = "block";
			this._search_panel_obj.cfg.applyConfig( {
				context : [ this._search_input_el, h, g ],
				visible : true
			});
			this._search_panel_obj.cfg.fireQueue();
			e.on(window.document, "mousedown", this.mf_SearchHide, this, true)
		},
		mf_SearchHide : function() {
			this._search_panel_obj.hide();
			this._search_panel_ref.style.display = "none";
			e.removeListener(window.document, "mousedown", this.mf_SearchHide)
		},
		_addIEFace : function(f, j) {
			var g = document.selection;
			if (g && g.createRange) {
				var h = g.createRange();
				h.text = j;
				try {
					h.moveStart("character", -strlen(j))
				} catch (i) {
				}
			} else {
				f.value += j
			}
		},
		_addNotIEFace : function(f, h) {
			var g = document.selection;
			if (!(typeof f.selectionStart == "undefined")) {
				f.value = f.value.substr(0, f.selectionStart) + h + f.value.substr(f.selectionEnd)
			} else {
				f.value += h
			}
		},
		mf_InsertFace : function(j) {
			e.stopEvent(j);
			var h = e.fromEle(j);
			this.mf_FaceHide();
			var i = parseInt(h.id.substr(h.id.search("qqface_") + String("qqface_").length));
			var g = document.createElement("IMG");
			g.setAttribute("align", "absmiddle");
			g.src = this._qqclient.face_domain + "Face2/" + i + ".gif";
			var f = this._tabsManage._actTalkWin._talkTabs.mf_getActUinMsg();
			f.input.focus();
			if (e.isIE) {
				this._addIEFace(f.input, h.title)
			} else {
				this._addNotIEFace(f.input, h.title)
			}
			f.input.focus()
		},
		mf_ReceiveClassMsg : function(g) {
			var f = this._qqclient.bdylist.allClasses(this._qqclient.bdylist.currentClass);
			if (f) {
				f.msg_flag = 0;
				if (this._qqclient.bdylist.allUsers[String(f.uin)].history.get_msg_count() > 0) {
					this._qqclient.mainPanel._tabsManage.mf_notify_recv(this._qqclient.bdylist.currentClass)
				}
				this.mf_ResetClassMsg(f)
			}
		},
		mf_PreventClassMsg : function(g) {
			var f = this._qqclient.bdylist.allClasses(this._qqclient.bdylist.currentClass);
			if (f) {
				f.msg_flag = 1
			}
		},
		mf_ResetClassMsg : function(g) {
			var f = c.get("qqclass_" + g.uin);
			f.firstChild.innerHTML = g.name;
			this._qqclient.bdylist.allUsers[String(g.uin)].history.reset_msg_count()
		},
		mf_VisitClassSpace : function() {
			var f = this._qqclient.bdylist.allClasses(this._qqclient.bdylist.currentClass);
			if (f) {
				window.open(group_space_server_domain + "/group_index.shtml?groupid=" + f.code, "class_space")
			}
		},
		mf_onActivate : function() {
			this._hideAllMenus();
			this.bringToTop()
		},
		_hideAllMenus : function() {
			this.mf_FaceHide()
		},
		mf_IsShow : function() {
			return this.cfg.getProperty("visible")
		},
		mf_switch_show : function(f) {
			this.mf_TaskStatMenuShow(f)
		},
		mf_btn_mouse_ev : function(f) {
			var g = e.fromEle(f);
			if (!g) {
				return
			}
			if (f.type == "mouseover") {
				if (g.nodeName.toUpperCase() == "IMG") {
					g.src = g.src.replace("g.gif", "l.gif")
				}
			} else {
				if (f.type == "mouseout") {
					if (g.nodeName.toUpperCase() == "IMG") {
						g.src = g.src.replace("l.gif", "g.gif")
					}
				}
			}
		},
		mf_FriendExpand : function(f) {
			e.stopEvent(f);
			this._user_friend_el.className = "mshover";
			this._user_class_el.className = "";
			this._user_list_option_el.style.display = "block";
			this._user_list_el.style.display = "block";
			this._qqgroup_list_option_el.style.display = "none";
			this._class_list_el.style.display = "none"
		},
		mf_ClassExpand : function(f) {
			e.stopEvent(f);
			this._user_friend_el.className = "";
			this._user_class_el.className = "mshover";
			this._user_list_option_el.style.display = "none";
			this._user_list_el.style.display = "none";
			this._qqgroup_list_option_el.style.display = "block";
			this._class_list_el.style.display = "block"
		},
		showChatlogMenu : function(f, g) {
			if (!!f && !!g) {
				c.setStyle(this._chatlogMenuPanelEl, "left", f + "px");
				c.setStyle(this._chatlogMenuPanelEl, "top", g + "px")
			}
			c.setStyle(this._chatlogMenuPanelEl, "display", "block");
			e.on(window.document, "mouseup", this.hideChatlogMenu, this, true)
		},
		hideChatlogMenu : function() {
			c.setStyle(this._chatlogMenuPanelEl, "display", "none");
			e.removeListener(window.document, "mouseup", this.hideChatlogMenu)
		},
		clickChatlogViewButton : function(g) {
			e.stopEvent(g);
			var h = this._qqclient.mainPanel._tabsManage._actTalkWin;
			var f;
			if (h) {
				f = h.uin;
				this.viewChatlog(f)
			}
		},
		clickChatlogExportButton : function(g) {
			e.stopEvent(g);
			var h = this._qqclient.mainPanel._tabsManage._actTalkWin;
			var f;
			if (h) {
				f = h.uin;
				this.exportChatlog(f)
			}
		},
		viewChatlog : function(g) {
			var f = this._qqclient.mainPanel._tabsManage._uin2container[g];
			if (f) {
			}
			this._tabsManage.minAllChatbox();
			this.openChatlogTab()
		},
		exportChatlog : function(g) {
			var f = this._qqclient.mainPanel._tabsManage._uin2container[g];
			if (f) {
				f._ExportChatlogPostContentEl.value = f._history_ref.innerHTML;
				f._ExportChatlogFormEl.submit()
			}
		},
		mf_StatMenuShow : function(f) {
			var g = c.getXY(this._sta_mnu_pos_ref);
			this._sta_menu_obj.cfg.applyConfig( {
				x : g[0],
				y : g[1],
				visible : true
			});
			this._sta_menu_obj.cfg.fireQueue();
			e.stopEvent(f);
			this._sta_menu_obj.bringToTop();
			e.on(document.body, "mousedown", this.mf_StatMenuHide, this, true)
		},
		mf_clickStatusMenu : function(f) {
			e.stopEvent(f);
			this.mf_TaskStatMenuShow(f)
		},
		mf_clickSettingMenu : function(f) {
			var h = c.getX(this._setting_menu_el);
			var g = c.getY(this._setting_menu_el) + 20;
			this._setting_menu_panel_node.style.left = h + "px";
			this._setting_menu_panel_node.style.top = g + "px";
			this._setting_menu_panel_node.style.display = "block";
			e.on(document.body, "mousedown", this.mf_SettingMenuHide, this, true)
		},
		mf_TaskStatMenuShow : function(f) {
			var h = c.getX(this._status_menu_button_node);
			var g = c.getY(this._status_menu_button_node) + 18;
			this._status_menu_panel_node.style.left = h + "px";
			this._status_menu_panel_node.style.top = g + "px";
			this._status_menu_panel_node.style.display = "block";
			e.on(document.body, "mousedown", this.mf_StatMenuHide, this, true)
		},
		mf_StatMenuHide : function() {
			e.removeListener(document.body, "mousedown", this.mf_StatMenuHide);
			this._status_menu_panel_node.style.display = "none"
		},
		mf_SettingMenuHide : function(f) {
			e.removeListener(document.body, "mousedown", this.mf_SettingMenuHide);
			this._setting_menu_panel_node.style.display = "none"
		},
		mf_TaskExitMenuShow : function(g) {
			var f = e.getTarget(g);
			var h = c.getXY(f);
			this._ext_menu_obj.cfg.applyConfig( {
				x : h[0],
				y : (h[1] - parseInt(c.getStyle(this._ext_menu_ref, "height"))),
				visible : true
			});
			this._ext_menu_obj.cfg.fireQueue();
			e.preventDefault(g);
			this._ext_menu_obj.bringToTop();
			e.on(document.body, "mousedown", this.mf_TaskExitMenuHide, this, true)
		},
		mf_ClassMenuShow : function(i) {
			var g = e.getTarget(i);
			if (g.id.search("qqclass_") < 0) {
				return
			}
			var j = e.getXY(i), h = 0;
			this._qqclient.bdylist.currentClass = parseInt(g.id.substring(g.id.search("qqclass_") + String("qqclass_").length));
			var f = this._qqclient.bdylist.allClasses(this._qqclient.bdylist.currentClass);
			if (f) {
				h = f.msg_flag
			}
			c.removeClass(this._cls_menu_ref.childNodes[1].childNodes[2].childNodes[1], "selected");
			c.removeClass(this._cls_menu_ref.childNodes[1].childNodes[2].childNodes[2], "selected");
			switch (h) {
			case 0:
				c.addClass(this._cls_menu_ref.childNodes[1].childNodes[2].childNodes[1], "selected");
				break;
			case 1:
				c.addClass(this._cls_menu_ref.childNodes[1].childNodes[2].childNodes[2], "selected");
				break;
			default:
				break
			}
			this._cls_menu_obj.cfg.applyConfig( {
				x : j[0],
				y : j[1],
				visible : true
			});
			this._cls_menu_obj.cfg.fireQueue();
			e.preventDefault(i);
			this._cls_menu_obj.bringToTop();
			e.on(document.body, "mousedown", this.mf_ClassMenuHide, this, true)
		},
		mf_TaskExitMenuHide : function() {
			e.removeListener(document.body, "mousedown", this.mf_TaskExitMenuHide);
			this._ext_menu_obj.hide()
		},
		mf_ClassMenuHide : function() {
			e.removeListener(document.body, "mousedown", this.mf_ClassMenuHide);
			this._cls_menu_obj.hide()
		},
		mf_clickMyQQLevelButton : function(f) {
			e.stopEvent(f);
			this.mf_showMyQQLevelPanel(f)
		},
		mf_showMyQQLevelPanel : function(f) {
			var h = c.getX(this._my_qqlevel_button_node);
			var g = c.getY(this._my_qqlevel_button_node) + 18;
			this._my_qqlevel_panel_node.style.left = h + "px";
			this._my_qqlevel_panel_node.style.top = g + "px";
			this._my_qqlevel_panel_node.style.display = "block";
			e.on(document.body, "mouseup", this.mf_hideMyQQLevelPanel, this, true)
		},
		mf_hideMyQQLevelPanel : function(f) {
			YAHOO.log("mf_hideMyQQLevelPanel", "error", "main-panel.js");
		},
		mf_UpdateWindow : function() {
			this.render();
			var f = Math.max(0, c.getViewportWidth() - parseInt(c.getStyle(this._eleRef, "width")) - (e.isSafari ? 16 : 0));
			this.cfg.setProperty("xy", [ f, 0 ])
		},
		mf_SetHead : function(f, g) {
			this._my_avatar_img_node.src = face_server_domain + "/images/buddy-48x48.png";
		},
		mf_ShortKey : function(h) {
			h = e.getEvent(h);
			var f = e.getCharCode(h);
			if (h.ctrlKey && h.altKey) {
				switch (f) {
				case 67:
					if (confirm("您确定关闭所有的会话窗口吗？")) {
						this._tabsManage.closeAllChatbox();
						e.stopEvent(h)
					}
					break;
				case 76:
					YAHOO.log("mf_ShortKey -> toLockQQ", "error", "main-panel.js");
					e.stopEvent(h);
					this.toLockQQ();
					break;
				default:
					break
				}
			} else {
				if (h.ctrlKey) {
					switch (f) {
					case 37:
						this._tabsManage.mf_SwcPrevWindow();
						e.stopEvent(h);
						break;
					case 39:
						this._tabsManage.mf_SwcNextWindow();
						e.stopEvent(h);
						break;
					case 81:
						this._taskBar.mf_flick_click(null);
						e.stopEvent(h);
						break;
					case 32:
					case 38:
					case 40:
						break;
					default:
						break
					}
				} else {
					if (h.altKey) {
						switch (f) {
						case -1:
							e.stopEvent(h);
							break;
						case 76:
							e.stopEvent(h);
							this.toLockQQ();
							break;
						case 87:
							e.stopEvent(h);
							this.switchMainpanelMax();
							break;
						case 88:
							e.stopEvent(h);
							this.mf_CloseWindow();
							break;
						case 67:
							var j = this._qqclient.mainPanel._tabsManage._actTalkWin;
							if (j) {
								j.mf_CloseWindow()
							}
						default:
							break
						}
					} else {
						switch (f) {
						case 191:
							var g = e.fromEle(h);
							var i = g.tagName.toLowerCase();
							if (i !== "input" && i !== "textarea") {
								this._search_input_el.focus();
								e.stopEvent(h)
							}
							break;
						default:
							break
						}
					}
				}
			}
		},
		mf_ShowWindow : function() {
			c.setStyle(this._eleRef, "display", "block")
		},
		mf_HideWindow : function() {
			c.setStyle(this._eleRef, "display", "none")
		},
		handleClickToLockQQ : function(f) {
			YAHOO.log("handleClickToLockQQ", "error", "main-panel.js");
		},
		toLockQQ : function() {
			YAHOO.log("toLockQQ", "error", "main-panel.js");
		},
		keydownSetPasswordInput2 : function(g) {
			YAHOO.log("keydownSetPasswordInput2", "error", "main-panel.js");
		},
		cancelLockQQ : function() {
			YAHOO.log("cancelLockQQ", "error", "main-panel.js");
		},
		checkToLockQQ : function() {
			YAHOO.log("checkToLockQQ", "error", "main-panel.js");
		},
		lockQQ : function(f) {
			YAHOO.log("lockQQ", "error", "main-panel.js");
		},
		keydownUnlockPasswordInput : function(g) {
			YAHOO.log("keydownUnlockPasswordInput", "error", "main-panel.js");
		},
		stopEvent : function(f) {
			e.stopEvent(f)
		},
		checkIsBeHacked : function() {
			this.lockQQ(this._pw_md5);
			alert("请勿非法修改程序！")
		},
		checkToUnlockQQ : function() {
			YAHOO.log("checkToUnlockQQ", "error", "main-panel.js");
		},
		unlockQQ : function() {
			YAHOO.log("unlockQQ", "error", "main-panel.js");
		},
		mf_CloseWindow : function() {
			if (!confirm("您确认要退出Chatty吗？")) {
				return
			}
			this._qqclient.removeCloseHook();
			var f = this, g = {
				onSuccess : function() {
					f._qqclient.closeConn();
					f._qqclient.showLoginPage()
				},
				onFail : function() {
				},
				sscope : f,
				fscope : f,
				arguments : {},
				cmd : "01",
				body : f._qqclient.cs.cs0x01()
			};
			this._qqclient.getCmdInfo(g);
			setTimeout(function() {
				f._qqclient.closeConn();
				f._qqclient.showLoginPage()
			}, 500)
		},
		mf_updateUinStat : function() {
			this._taskBar.mf_update_status_icon(true)
		},
		mf_SwcGroupInfo : function(j, f) {
			var i = this._qqclient.bdylist.groups[j];
			if (!i || !this._group_el[j] || !this._group_el[j].group_a_ele) {
				return
			}
			if (this._group_el[j].group_a_ele.className == "sdown") {
				f = true
			}
			if (f) {
				var h = i.online_users.index.length + i.away_users.index.length;
				var g = h + i.offline_users.index.length;
				this._group_el[j].group_a_ele.innerHTML = (i.name + "&nbsp;[" + h + (i.id == "_1000" ? "" : ("/" + g)) + "]")
			} else {
				this._group_el[j].group_a_ele.innerHTML = "&nbsp;"
			}
		},
		mf_SwcUinStat : function(i, g) {
			var f = this._qqclient.bdylist.allUsers[i] || this._qqclient.bdylist.allClasses[i];
			if (f && f.class_id == -1 && f.group_id == -1) {
				if (!this._group_el[i] || !this._group_el[i].group_a_ele) {
					return
				}
				if (g) {
					this._group_el[i].group_a_ele.lastChild.innerHTML = this._group_el[i].nick
				} else {
					this._group_el[i].group_a_ele.lastChild.innerHTML = ""
				}
				return
			}
			if (!f || (!this._group_el[f.group_id])) {
				return
			}
			var h = this._group_el[f.group_id].user_ele[i];
			if (!h) {
				return
			}
			h.firstChild.className = (g) ? "icos" : "icos htmenu"
		},
		mf_updateGroupStat : function(h) {
			var g = h.online_users.index.length + h.away_users.index.length;
			var f = g + h.offline_users.index.length;
			if (this._group_el[h.id]) {
				this._group_el[h.id].group_a_ele.innerHTML = (h.name + "&nbsp;[" + g + (h.id == "_1000" ? "" : ("/" + f)) + "]")
			}
		},
		mf_updateGenderStat : function(g, f) {
			YAHOO.log("mf_updateGenderStat", "error", "main-panel.js");
		},
		mf_addGroup : function(j) {
			if (j) {
				var i = document.createElement("A");
				i.id = this._id_pre + "group_" + j.id;
				i.className = (j.id == "_1000") ? "sup2" : "sup";
				var h = j.online_users.index.length + j.away_users.index.length;
				var g = h + j.offline_users.index.length;
				i.innerHTML = (j.name + "&nbsp;[" + h + (j.id == "_1000" ? "" : ("/" + g)) + "]");
				this._user_list_el.appendChild(i);
				var f = document.createElement("div");
				f.id = this._id_pre + "group_" + j.id + "_div";
				f.style.display = "none";
				this._user_list_el.appendChild(f);
				this._group_el[j.id] = {
					group_a_ele : i,
					group_div_ele : f,
					split_ele : [],
					user_ele : []
				};
				e.on(i, "click", this.mf_UserlistExpand, this, true)
			}
		},
		mf_addClass : function(h) {
			alert("mf_addClass");
			var i = h.uin;
			if (!h || c.get("qqclass_" + i)) {
				return
			}
			var l = document.createElement("DIV");
			l.id = "qqclass_" + i;
			l.className = "tmenus";
			c.setStyle(l, "margin-left", "6px");
			var g = h.name || i, j = 1, k = (h.property == 1) ? 2002 : 2001;
			var f = "webqq_image_" + h.uin;
			l.innerHTML = '<div class="icos"><a href="#"><img id="' + f + '" src="' + face_server_domain + "/images/buddy-48x48.png"
					+ '" /></a></div><div title="' + String(g).forTitle() + "(" + h.code + ')" class="names">' + String(g).forHtml() + "</div>";
			l.title = String(h.name).forTitle() + "(" + h.code + ")";
			if (this._class_list_el) {
				this._class_list_el.appendChild(l)
			}
			this._group_el[i] = {
				group_a_ele : l,
				nick : h.name,
				split_ele : [],
				user_ele : []
			};
			e.on(l, "dblclick", this.mf_ChatWithClass, this, true);
			e.on(l, "mouseover", function() {
				this.style.background = "#e0edfe"
			});
			e.on(l, "mouseout", function() {
				this.style.background = "none"
			})
		},
		mf_addClassSplitter : function(f, g) {
			alert("mf_addClassSplitter");
			var i = f.uin;
			if (f) {
				var h = document.createElement("DIV");
				this._group_el[String(i)].group_div_ele.appendChild(h);
				this._group_el[String(i)].split_ele[g] = h
			}
		},
		mf_UpdateMember : function(f) {
			alert("mf_UpdateMember");
		},
		mf_updateClassUserSta : function(h, g, j) {
			alert("mf_updateClassUserSta");
			return true
		},
		mf_addGroupSplitter : function(h, f) {
			if (h) {
				var g = document.createElement("DIV");
				this._group_el[h.id].group_div_ele.appendChild(g);
				this._group_el[h.id].split_ele[f] = g
			}
		},
		longnickTimer : null,
		userlevelTimer : null,
		mf_UpdateUserCard : function(j, v) {
			this._QQTips_avatar_node.src = face_server_domain + "/images/buddy-32x32.png";
			
			this._BuddyOnlineStateInTips_node.innerHTML = j.stat == 1 ? "在线" : "离线";
			this._BuddySignatureInTips_node.innerHTML = String(j.long_nick.content || "").forHtml();
			this._BuddySignatureInTips_node.title = String(j.long_nick.content || "").forTitle();
			this._BuddyQQLevelInTips_node.innerHTML = "";
			this._QQTips_avatar_node.setAttribute("uin", j.uin);
			var t = j.remark ? (j.remark + "(" + j.nick + ")<" + j.uin + ">") : (j.nick + "<" + j.uin + ">");
			this._QQTips_buddy_name_node.innerHTML = t.forHtml();
			this._QQTips_buddy_name_node.setAttribute("title", t.forTitle() + ", 点击查看详细资料");
			this._QQTips_buddy_name_node.setAttribute("uin", j.uin);
			if (j.level >= 0) {
				var r = parseInt(j.level / 64), n = parseInt((j.level % 64) / 16), h = parseInt(((j.level % 64) % 16) / 4), m = ((j.level % 64) % 16) % 4, p = "";
				for ( var k = 0; k < r; k++) {
					p += '<span class="queen"></span>'
				}
				for ( var k = 0; k < n; k++) {
					p += '<span class="sun"></span>'
				}
				for ( var k = 0; k < h; k++) {
					p += '<span class="moon"></span>'
				}
				for ( var k = 0; k < m; k++) {
					p += '<span class="star"></span>'
				}
				this._BuddyQQLevelInTips_node.innerHTML = p;
				this._BuddyQQLevelInTips_node.title = "等级：" + j.level
			} else {
				if (j.level < 0) {
					var w = this._qqclient;
					var g = 60, o = Math.max(j.pointer, 0), f = this._qqclient.bdylist.friendList.uins.slice(o, o + g) || [ j.id ];
					var q = {
						onSuccess : function(z) {
							if (true == this.sc.sc0x5c(z) && j && j.uin == this.mainPanel._private_info_panel_ref.uin && j.level >= 0) {
								var y = parseInt(j.level / 64), B = parseInt((j.level % 64) / 16), x = parseInt(((j.level % 64) % 16) / 4), D = ((j.level % 64) % 16) % 4, C = "";
								for ( var A = 0; A < y; A++) {
									C += '<span class="queen"></span>'
								}
								for ( var A = 0; A < B; A++) {
									C += '<span class="sun"></span>'
								}
								for ( var A = 0; A < x; A++) {
									C += '<span class="moon"></span>'
								}
								for ( var A = 0; A < D; A++) {
									C += '<span class="star"></span>'
								}
								this.mainPanel._BuddyQQLevelInTips_node.innerHTML = C;
								this.mainPanel._BuddyQQLevelInTips_node.title = "等级：" + j.level
							}
						},
						onFail : w.onFailLevelInfo || function() {
						},
						sscope : w,
						fscope : w,
						arguments : {},
						cmd : "5c",
						body : w.cs.cs0x5c_0x89(f)
					};
					w.getCmdInfo(q)
				}
			}
			this.mf_updateImpression(j.id);
			this._BuddyQzoneInTips_node.href = qzone_user_server_domain + "/" + j.id;
			this._ViewBuddyDetailsButtonInTips_node.setAttribute("uin", j.id);
			this._ViewBuddyDetailsButtonInTips2_node.setAttribute("uin", j.id);
			this._AddBuddyButtonInTips_node.setAttribute("uin", j.id);
			this._SendEmailButtonInTips_node.href = qmail_server_domain + "/cgi-bin/login?Fun=clientwrite&vm=pt&email=" + j.id + "@qq.com";
			this._private_info_panel_ref.uin = j.id;
			if (this._qqclient.uin === j.id) {
				c.setStyle(this._BuddyOptionPanel_node, "display", "none");
				c.setStyle(this._StrangerOptionPanel_node, "display", "none")
			} else {
				if (this._qqclient.isFriend(j.id) === -1) {
					c.setStyle(this._BuddyOptionPanel_node, "display", "none");
					c.setStyle(this._StrangerOptionPanel_node, "display", "block");
					this.addBuddy._lastResults[j.id] = this._qqclient.bdylist.allUsers[j.id]
				} else {
					this.buddyOptionTabInTips.cancelSelected();
					this._RemarkInputInTips_node.setAttribute("uin", j.id);
					c.setStyle(this._BuddyOptionPanel_node, "display", "block");
					c.setStyle(this._StrangerOptionPanel_node, "display", "none");
					var l = "";
					for ( var k in this._qqclient.bdylist.groups) {
						if (k != "_1000" && k != "1000") {
							l += '<a class="buddyClassItemInTips" classId="' + this._qqclient.bdylist.groups[k].id + '" href="###">' + this._qqclient.bdylist.groups[k].name + "</a>"
						}
					}
					this._MyBuddyClassListInTips_node.innerHTML = l
				}
			}
			this._currentUserCardEl = v;
			if (!j.long_nick.got) {
				if (this.longnickTimer) {
					clearTimeout(this.longnickTimer)
				}
				var w = this;
				var u = 20, s = Math.max(j.pointer, 0), f = this._qqclient.bdylist.friendList.uins.slice(s, s + u) || [ j.id ];
				this.longnickTimer = setTimeout(function() {
					w._qqclient.getLDLongNickInfo(f)
				}, 1000)
			}
		},
		handleClickRemoveBuddy : function(i) {
			var g = this._private_info_panel_ref.uin;
			var f = this, h = {
				onSuccess : f.handleRemoveBuddySuccess || function() {
				},
				onFail : function() {
					alert("删除好友失败")
				},
				sscope : f,
				fscope : f,
				arguments : {
					info : {
						friend_uin : g
					}
				}
			};
			this._qqclient.sendRemoveBuddy(h, g)
		},
		handleRemoveBuddySuccess : function(h) {
			var k = h.info.friend_uin, g = this._qqclient.bdylist.allUsers[k];
			if (!g) {
				return
			}
			var l = g.group_id;
			var j = this._qqclient.bdylist.groups[l];
			var f = this._qqclient.bdylist.allUsers[k].stat;
			var m = this._qqclient.bdylist.groups._1000;
			this.removeBuddyFromListDom(k);
			this.removeBuddyFromOnlineListDom(k);
			this._qqclient.bdylist.allUsers[k].group_id = -1;
			if (f === 10) {
				m.online_users.rmv_user(k);
				m.away_users.rmv_user(k);
				j.online_users.rmv_user(k);
				this.mf_updateGroupStat(this._qqclient.bdylist.groups._1000)
			} else {
				if (f === 20) {
					j.offline_users.rmv_user(k)
				} else {
					if (f === 30) {
						j.away_users.rmv_user(k)
					}
				}
			}
			this.mf_updateGroupStat(this._qqclient.bdylist.groups[l]);
			var i = this._tabsManage._uin2container[k] || null;
			if (i) {
				i.mf_HideWindow();
				i._tabs_manage.mf_unreg(i)
			}
			this._private_info_panel_ref.style.display = "none";
			this._private_info_panel_obj.hide();
			alert("删除好友成功!")
		},
		removeBuddyFromOnlineListDom : function(g) {
			var f = c.get("online_user_" + g);
			if (f) {
				var h = f.parentNode;
				h.removeChild(f)
			}
		},
		removeBuddyFromListDom : function(f) {
			var h = c.get("user_" + f);
			if (h) {
				var g = h.parentNode;
				g.removeChild(h)
			}
		},
		cancelBuddyOptionSelected : function() {
			this.buddyOptionTabInTips.cancelSelected()
		},
		clickMyBuddyClassListInTips : function(m) {
			var h = e.getTarget(m);
			var j = String(h.getAttribute("classId"));
			var g = this._private_info_panel_ref.uin;
			var l = this;
			h.blur();
			var f = this, k = {
				onSuccess : f.handleMoveBuddySuccess || function() {
				},
				onFail : function() {
					alert("移动好友分组失败")
				},
				sscope : f,
				fscope : f,
				arguments : {
					info : {
						friend_uin : g,
						group_id : j
					}
				}
			};
			var i = {
				onSuccess : f.handleMoveBuddySuccess,
				scope : f,
				argument : {
					friend_uin : g,
					group_id : j
				}
			};
			if (j == "1001") {
				if (window.confirm("确定将此好友移动到黑名单吗？")) {
					this._qqclient.sendMoveBuddyToBlacklist(i)
				}
			} else {
				this._qqclient.sendMoveBuddy(k, g, j)
			}
		},
		handleMoveBuddySuccess : function(g) {
			var i = g.info.friend_uin;
			var k = g.info.group_id;
			var j = this._qqclient.bdylist.allUsers[i].group_id;
			this.removeBuddyFromListDom(i);
			this.moveBuddyDomToClass(i, k);
			this.mf_updateGroupStat(this._qqclient.bdylist.groups[j]);
			this.mf_updateGroupStat(this._qqclient.bdylist.groups[k]);
			if (k == "1001") {
				var h = this._tabsManage._uin2container[i] || null;
				if (h) {
					h.mf_HideWindow();
					h._tabs_manage.mf_unreg(h)
				}
				var l = this._qqclient.bdylist.groups._1000;
				var f = this._qqclient.bdylist.allUsers[i].stat;
				if (f === 10) {
					l.online_users.rmv_user(i);
					l.away_users.rmv_user(i);
					this.removeBuddyFromOnlineListDom(i);
					this.mf_updateGroupStat(this._qqclient.bdylist.groups._1000)
				}
			}
			alert("移动成功!")
		},
		moveBuddyDomToClass : function(i, k) {
			var j = this._qqclient.bdylist.allUsers[i].group_id;
			var f = this._qqclient.bdylist.allUsers[i].stat;
			var g = this._qqclient.bdylist.groups[j];
			var h = this._qqclient.bdylist.groups[k];
			if (f === 10) {
				g.online_users.rmv_user(i);
				this._qqclient.bdylist.allUsers[i].group_id = k;
				h.online_users.add_user(i);
				this.mf_addUser(i, "online", 1)
			} else {
				if (f === 20) {
					g.offline_users.rmv_user(i);
					this._qqclient.bdylist.allUsers[i].group_id = k;
					h.offline_users.add_user(i);
					this.mf_addUser(i, "offline", 1)
				} else {
					if (f === 30) {
						g.away_users.rmv_user(i);
						this._qqclient.bdylist.allUsers[i].group_id = k;
						h.away_users.add_user(i);
						this.mf_addUser(i, "away", 1)
					}
				}
			}
		},
		clickModifyRemarkSendButtonInTips : function() {
			var g = this._RemarkInputInTips_node.getAttribute("uin"), f = this._RemarkInputInTips_node.value;
			if (f == "") {
				alert("请输入备注！")
			} else {
				this.sendSetRealname(g, f);
				this.buddyOptionTabInTips.cancelSelected();
				this._private_info_panel_ref.style.display = "none"
			}
		},
		keydownModifyRemarkSendButtonInTips : function(g) {
			var f = e.getCharCode(g);
			if (f == 13) {
				this.clickModifyRemarkSendButtonInTips()
			}
		},
		loadQQLevelAndSignature : function(f) {
		},
		mf_addUser : function(g, m, q, j) {
			var k = this._qqclient.bdylist.allUsers[g];
			var f = (q == 1) ? k.group_id : j;
			if (!k || !this._group_el[f]) {
				return false
			}
			var o = c.get("user_" + g);
			if (o) {
				if (String(o.getAttribute("group_id")) == "1000") {
					var h = this._qqclient.bdylist.groups["1000"];
					this.removeBuddyFromListDom(g);
					h.online_users.rmv_user(g);
					h.offline_users.rmv_user(g);
					h.away_users.rmv_user(g);
					this.mf_updateGroupStat(h)
				} else {
					if (String(o.getAttribute("group_id")) == "1001") {
						var l = this._qqclient.bdylist.groups["1001"];
						this.removeBuddyFromListDom(g);
						l.online_users.rmv_user(g);
						l.offline_users.rmv_user(g);
						l.away_users.rmv_user(g);
						this.mf_updateGroupStat(l)
					} else {
						return false
					}
				}
			}
			var n = document.createElement("DIV");
			n.id = "user_" + g;
			n.className = "tmenus";
			if (k.group_id == "1000") {
				n.setAttribute("group_id", "1000")
			} else {
				if (k.group_id == "1001") {
					n.setAttribute("group_id", "1001")
				}
			}
			var s = k.remark || k.nick || g;
			var p = k.face || 0;
			var r = "webqq_image_" + g;
			var i = ((k.vip == 1) ? "red;" : "");
			switch (m) {
			case "online":
				n.innerHTML = '<div class="icos"><a href="#"><img id="' + r + '" src="' + img_server_domain + '/images/qq_avatar_shadow.gif" /></a></div><div style="color:' + i + '" class="names">'
						+ String(s).forHtml() + "</div>";
				break;
			case "offline":
				n.innerHTML = '<div class="icos"><a href="#"><img id="' + r + '" class="offline" src="' + img_server_domain + '/images/qq_avatar_shadow.gif" /></a></div><div class="names">'
						+ String(s).forHtml() + "</div>";
				break;
			case "away":
				n.innerHTML = '<div class="icos"><a href="#"><img id="' + r + '" src="' + img_server_domain + '/images/qq_avatar_shadow.gif" /></a></div><div class="names">' + String(s).forHtml()
						+ '</div><div class="away" title="离开"></div>';
				break;
			default:
				break
			}
			if (m == "offline") {
				this._group_el[f].group_div_ele.appendChild(n)
			} else {
				c.insertAfter(n, this._group_el[f].split_ele[m])
			}
			this._group_el[f].user_ele[g] = n;
			var t = c.get(r);
			this._qqclient.image_el.push( {
				img : t,
				uin : g
			});
			e.on(n, "dblclick", this.mf_ChatWithUser, this, true);
			e.on(n, "mouseover", function() {
				this.style.background = "#e0edfe"
			});
			e.on(n, "mouseout", function() {
				this.style.background = "none"
			});
			e.on(n.firstChild, "mouseover", function(v, u) {
				u.mf_UpdateUserCard(k, this);
				u._private_info_panel_ref.style.display = "block";
				u.resetUserCardPosition(this)
			}, this);
			return true
		},
		mf_addOnlineUser : function(g, j, p) {
			var i = this._qqclient.bdylist.allUsers[g];
			var f = p;
			if (!i || !this._group_el[f]) {
				return false
			}
			if (c.get("online_user_" + g)) {
				return false
			}
			var k = document.createElement("DIV");
			k.id = "online_user_" + g;
			k.className = "tmenus";
			var n = i.remark || i.nick || g;
			var l = i.face || 0;
			var m = "webqq_online_image_" + g;
			var h = ((i.vip == 1) ? "red;" : "");
			switch (j) {
			case "online":
				k.innerHTML = '<div class="icos"><a href="#"><img id="' + m + '" src="' + img_server_domain + '/images/qq_avatar_shadow.gif" /></a></div><div style="color:' + h + '" class="names">'
						+ String(n).forHtml() + "</div>";
				break;
			case "offline":
				k.innerHTML = '<div class="icos"><a href="#"><img id="' + m + '" class="offline" src="' + img_server_domain + '/images/qq_avatar_shadow.gif" /></a></div><div class="names">'
						+ String(n).forHtml() + "</div>";
				break;
			case "away":
				k.innerHTML = '<div class="icos"><a href="#"><img id="' + m + '" src="' + img_server_domain + '/images/qq_avatar_shadow.gif" /></a></div><div class="names">' + String(n).forHtml()
						+ '</div><div class="away" title="离开"></div>';
				break;
			default:
				break
			}
			if (j == "offline") {
				this._group_el[f].group_div_ele.appendChild(k)
			} else {
				c.insertAfter(k, this._group_el[f].split_ele[j])
			}
			this._group_el[f].user_ele[g] = k;
			var o = c.get(m);
			this._qqclient.image_el.push( {
				img : o,
				uin : g
			});
			e.on(k, "dblclick", this.mf_ChatWithUser, this, true);
			e.on(k, "mouseover", function() {
				this.style.background = "#e0edfe"
			});
			e.on(k, "mouseout", function() {
				this.style.background = "none"
			});
			e.on(k.firstChild, "mouseover", function(r, q) {
				q.mf_UpdateUserCard(i, this);
				q._private_info_panel_ref.style.display = "block";
				q.resetUserCardPosition(this)
			}, this);
			return true
		},
		resetUserCardPosition : function(f) {
			this._private_info_panel_obj.cfg.applyConfig( {
				iframe : false,
				context : [ f, "tr", "tl" ],
				visible : true,
				constraintoviewport : true
			});
			this._private_info_panel_obj.cfg.fireQueue()
		},
		mf_updateUserSta : function(l, k) {
			var h = this._qqclient.bdylist.allUsers[l];
			if (!h || (!this._group_el[h.group_id])) {
				return false
			}
			var j = this._group_el[h.group_id].user_ele[l];
			if (!j) {
				return false
			}
			e.removeListener(j, "dblclick", this.mf_ChatWithUser);
			this._group_el[h.group_id].group_div_ele.removeChild(j);
			this._group_el[h.group_id].user_ele[l] = null;
			j = document.createElement("DIV");
			j.id = "user_" + l;
			j.className = "tmenus";
			var f = h.remark || h.nick || l;
			var m = h.face || 0;
			var g = ((h.vip == 1) ? "red;" : "");
			switch (k) {
			case "online":
				j.innerHTML = '<div class="icos"><a href="#"><img src="' + face_server_domain + "/images/buddy-48x48.png"
						+ '" /></a></div><div title="' + (h.remark ? String(h.remark).forTitle() + "(" + String(h.nick).forTitle() + ")" : String(h.nick).forTitle() + "<" + l + ">")
						+ '" class="names">' + String(f).forHtml() + "</div>";
				if (h.vip == 1) {
					j.childNodes[1].style.color = "red"
				}
				break;
			case "offline":
				j.innerHTML = '<div class="icos"><a href="#"><img class="offline" src="' + face_server_domain + "/images/buddy-48x48.png"
						+ '" /></a></div><div title="' + (h.remark ? String(h.remark).forTitle() + "(" + String(h.nick).forTitle() + ")" : String(h.nick).forTitle() + "(" + l + ")")
						+ '" class="names">' + String(f).forHtml() + "</div>";
				break;
			case "away":
				j.innerHTML = '<div class="icos"><a href="#"><img src="' + face_server_domain + "/images/buddy-48x48.png"
						+ '" /></a></div><div title="' + (h.remark ? String(h.remark).forTitle() + "(" + String(h.nick).forTitle() + ")" : String(h.nick).forTitle() + "(" + l + ")")
						+ '" class="names">' + String(f).forHtml() + '</div><div class="away" title="离开"></div>';
				if (h.vip == 1) {
					j.childNodes[1].style.color = "red"
				}
				break;
			default:
				break
			}
			var i = this._tabsManage._uin2container[l];
			if (i) {
				i.mf_setTitle(l, h.nick)
			}
			if (k == "offline") {
				this._group_el[h.group_id].group_div_ele.appendChild(j)
			} else {
				c.insertAfter(j, this._group_el[h.group_id].split_ele[k])
			}
			this._group_el[h.group_id].user_ele[l] = j;
			e.on(j, "dblclick", this.mf_ChatWithUser, this, true);
			e.on(j, "mouseover", function() {
				this.style.background = "#e0edfe"
			});
			e.on(j, "mouseout", function() {
				this.style.background = "none"
			});
			e.on(j.firstChild, "mouseover", function(o, n) {
				n.mf_UpdateUserCard(h, this);
				n._private_info_panel_ref.style.display = "block";
				n.resetUserCardPosition(this)
			}, this);
			return true
		},
		mf_updateOnlineUserSta : function(k, j, l) {
			var h = this._qqclient.bdylist.allUsers[k];
			if (!h || (!this._group_el[l])) {
				return false
			}
			var i = this._group_el[l].user_ele[k];
			if (i) {
				e.removeListener(i, "dblclick", this.mf_ChatWithUser);
				this._group_el[l].group_div_ele.removeChild(i)
			}
			this._group_el[l].user_ele[k] = null;
			i = document.createElement("DIV");
			i.id = "online_user_" + k;
			i.className = "tmenus";
			i.title = h.remark ? String(h.remark).forTitle() + "(" + String(h.nick).forTitle() + ")" : String(h.nick).forTitle() + "(" + k + ")";
			var f = h.remark || h.nick || k;
			var m = h.face || 0;
			var g = ((h.vip == 1) ? "red;" : "");
			switch (j) {
			case "online":
				i.innerHTML = '<div class="icos"><a href="#"><img src="' + face_server_domain + "/images/buddy-48x48.png"
						+ '" /></a></div><div title="' + (h.remark ? String(h.remark).forTitle() + "(" + String(h.nick).forTitle() + ")" : String(h.nick).forTitle() + "<" + k + ">")
						+ '" class="names">' + String(f).forHtml() + "</div>";
				if (h.vip == 1) {
					i.childNodes[1].style.color = "red"
				}
				break;
			case "offline":
				i.innerHTML = '<div class="icos"><a href="#"><img class="offline" src="' + face_server_domain + "/images/buddy-48x48.png"
						+ '" /></a></div><div class="names">' + String(f).forHtml() + "</div>";
				break;
			case "away":
				i.innerHTML = '<div class="icos"><a href="#"><img src="' + face_server_domain + "/images/buddy-48x48.png"
						+ '" /></a></div><div class="names">' + String(f).forHtml() + '</div><div class="away" title="离开"></div>';
				if (h.vip == 1) {
					i.childNodes[1].style.color = "red"
				}
				break;
			default:
				break
			}
			if (j == "offline") {
			} else {
				c.insertAfter(i, this._group_el[l].split_ele[j]);
				this._group_el[l].user_ele[k] = i
			}
			e.on(i, "dblclick", this.mf_ChatWithUser, this, true);
			e.on(i, "mouseover", function() {
				this.style.background = "#e0edfe"
			});
			e.on(i, "mouseout", function() {
				this.style.background = "none"
			});
			e.on(i.firstChild, "mouseover", function(o, n) {
				n.mf_UpdateUserCard(h, this);
				n._private_info_panel_ref.style.display = "block";
				n.resetUserCardPosition(this)
			}, this);
			return true
		},
		mf_updateUserVip : function(h) {
			var f = this._qqclient.bdylist.allUsers[h];
			if (!f || (!this._group_el[f.group_id])) {
				return false
			}
			var g = this._group_el[f.group_id].user_ele[h];
			if (!g) {
				return false
			}
			g.childNodes[1].style.color = "red";
			if (!this._group_el._1000) {
				return false
			}
			var g = this._group_el._1000.user_ele[h];
			if (!g) {
				return false
			}
			g.childNodes[1].style.color = "red"
		},
		mf_updateUserRealName : function(i, k) {
			var f = this._qqclient.bdylist.allUsers[i];
			if (!f || (!this._group_el[f.group_id])) {
				return false
			}
			var h = this._group_el[f.group_id].user_ele[i];
			if (!h) {
				return false
			}
			h.title = String(k).forTitle() + "<" + i + ">";
			h.childNodes[1].innerHTML = String(k).forHtml();
			var j = this._group_el._1000;
			if (j && j.user_ele[i]) {
				j.user_ele[i].title = String(k).forTitle() + "<" + i + ">";
				j.user_ele[i].childNodes[1].innerHTML = String(k).forHtml()
			}
			var g = this._tabsManage._uin2container[i];
			if (g) {
				g.mf_setTitle(i, f.nick)
			}
			return true
		},
		mf_getMarqueeMsgType : function(h) {
			var i = e.fromEle(h);
			var g;
			g = c.getAncestorByClassName(i, "tmenus") || c.getAncestorByClassName(i, "group") || c.getAncestorByClassName(i, "search-menus") || c.getAncestorByClassName(i, "middle-menus") || i;
			if (i.tagName.toLowerCase() == "img" && i.parentNode.getAttribute("isOpenChat") == "true") {
				g = i.parentNode
			}
			if (!g) {
				return null
			}
			var f = g.getAttribute("msgType") || "";
			return f
		},
		mf_getMarqueeSysMsgId : function(h) {
			var i = e.fromEle(h);
			var g;
			g = c.getAncestorByClassName(i, "tmenus") || c.getAncestorByClassName(i, "group") || c.getAncestorByClassName(i, "search-menus") || c.getAncestorByClassName(i, "middle-menus") || i;
			if (i.tagName.toLowerCase() == "img" && i.parentNode.getAttribute("isOpenChat") == "true") {
				g = i.parentNode
			}
			if (!g) {
				return null
			}
			var f = g.getAttribute("sysMsgId");
			return f
		},
		mf_getNodeOfEvent : function(g) {
			var h = e.fromEle(g);
			var f;
			f = c.getAncestorByClassName(h, "tmenus") || c.getAncestorByClassName(h, "group") || c.getAncestorByClassName(h, "search-menus") || c.getAncestorByClassName(h, "middle-menus") || h;
			if (h.tagName.toLowerCase() == "img" && h.parentNode.getAttribute("isOpenChat") == "true") {
				f = h.parentNode
			}
			if (!f) {
				return null
			}
			return f
		},
		mf_getChatUser : function(i) {
			var j = e.fromEle(i);
			var g;
			g = c.getAncestorByClassName(j, "tmenus") || c.getAncestorByClassName(j, "tboxmenus") || c.getAncestorByClassName(j, "group") || c.getAncestorByClassName(j, "search-menus")
					|| c.getAncestorByClassName(j, "middle-menus") || j;
			if (j.tagName.toLowerCase() == "img" && j.parentNode.getAttribute("isOpenChat") == "true") {
				g = j.parentNode
			}
			if (!g) {
				return null
			}
			var f = g.id || "";
			if (f.indexOf("user_") >= 0) {
				return f.substr(f.indexOf("user_") + 5)
			} else {
				if (f.indexOf("qqclass_") >= 0) {
					return f.substr(f.indexOf("qqclass_") + 8)
				} else {
					if (f.indexOf("search_") >= 0) {
						return f.substr(f.indexOf("search_") + 7)
					} else {
						if (f.indexOf("marqueeMsg_") >= 0) {
							return f.substr(f.indexOf("marqueeMsg_") + 11)
						} else {
							if (f.indexOf("middle_") >= 0) {
								return f.substr(f.indexOf("middle_") + 7)
							} else {
								if (f.indexOf("online_user_") >= 0) {
									return f.substr(f.indexOf("online_user_") + 12)
								}
							}
						}
					}
				}
			}
			var h = g.getAttribute("uin");
			if (h) {
				return h
			}
			return null
		},
		mf_removeFromMidArea : function(g) {
			var k = this._qqclient.bdylist.allUsers[g] || this._qqclient.bdylist.allClasses[g], m = this._friend_offmsg_area_c_el, h = this._friend_offmsg_area_h_el, n = this._friend_msg_count_ref, o = this._friend_msg_count2_ref;
			if (k && k.group_id == -1 && k.class_id == -1) {
				m = this._class_offmsg_area_c_el;
				h = this._class_offmsg_area_h_el;
				n = this._class_msg_count_ref, o = this._class_msg_count2_ref
			}
			var p = c.get("marqueeMsg_" + g);
			var j = c.get("middle_" + g);
			if (j) {
				n.innerHTML = Math.max(parseInt(n.innerHTML) - 1, 0);
				o.innerHTML = Math.max(parseInt(o.innerHTML) - 1, 0);
				this._all_msg_count_el.innerHTML = parseInt(this._friend_msg_count_ref.innerHTML) + parseInt(this._class_msg_count_ref.innerHTML)
						+ parseInt(this._mail_count_ref.innerHTML.split("+")[0]) + parseInt(this._sysmsg_count_ref.innerHTML);
				if (this._mail_count_ref.innerHTML.indexOf("+") > 0) {
					this._all_msg_count_el.innerHTML = this._all_msg_count_el.innerHTML + "+"
				}
				var f = this._qqclient.offline_msg;
				for ( var l = 0; l < f.length; l++) {
					if (f[l] == g) {
						f.splice(l, 1);
						break
					}
				}
				m.removeChild(j);
				this._message_marquee_inner_el.removeChild(p);
				this.mf_updateMarqueeMsg();
				if (this._message_marquee_inner_el.childNodes.length == 0) {
					c.setStyle(this._no_message_marquee_el, "display", "block")
				}
				if (m.childNodes.length == 0) {
					c.setStyle(h, "display", "block")
				}
			}
		},
		mf_ChatWithUser : function(i) {
			var f = new Date().getTime();
			var g = Math.abs(f - this._qqclient.last_oper_time);
			if (g >= 0 && g < 1000) {
				return
			}
			this._qqclient.last_oper_time = f;
			var h = this.mf_getChatUser(i);
			e.stopEvent(i);
			this.mf_act_chat_with(h, false);
			return h
		},
		mf_ChatWithClass : function(i) {
			var f = new Date().getTime();
			if (f - this._qqclient.last_oper_time < 1000) {
				return
			}
			this._qqclient.last_oper_time = f;
			var h = this.mf_getChatUser(i) || this._qqclient.bdylist.currentClass;
			var g = this._qqclient.bdylist.allClasses[h];
			if (g) {
				this.mf_act_chat_with_class(g, false)
			}
		},
		mf_act_chat_with : function(h, i) {
			var g = this._qqclient.bdylist.allUsers[String(h)] || {};
			if (h == this._qqclient.uin) {
				alert("对不起，您不能和自己交谈！");
				return
			}
			if (g && g.group_id == "1001") {
				return
			}
			var f = this._qqclient.bdylist.allClasses[h] || null;
			if (f) {
				this.mf_act_chat_with_class(f, i);
				return
			}
			var g = this._qqclient.bdylist.allUsers[h] || {};
			this._tabsManage.mf_act_create(h, g.nick || h, i)
		},
		mf_GetMemberRemarkInfo : function(g) {
			if (g && g.member_nick_got == false) {
				var f = this, h = {
					onSuccess : function(j) {
						var i = this._qqclient.sc.sc0x30(j);
						if (0 == i) {
							this.mf_GetMemberNickInfo(g)
						} else {
							if (1 == i) {
								this.mf_GetMemberRemarkInfo(g)
							}
						}
					},
					onFail : function(j) {
						YAHOO.log("拉取群名片失败");
						var i = j.info.acs;
						this.mf_GetMemberNickInfo(i)
					},
					sscope : f,
					fscope : f,
					arguments : {
						info : {
							acs : g
						}
					},
					cmd : "30",
					body : f._qqclient.cs.cs0x30_0x0f(g.uin, 0, g.cs_0x30_0x0f_next_pos)
				};
				this._qqclient.getCmdInfo(h);
				YAHOO.log("mf_GetMemberRemarkInfo")
			}
		},
		mf_GetMemberNickInfo : function(g) {
			if (g && g.member_nick_got == false) {
				var f = this, h = {
					onSuccess : function(j) {
						var i = this._qqclient.sc.sc0x0126(j);
						if (0 == i) {
							this.mf_UpdateMember(g)
						} else {
							if (1 == i) {
								this.mf_GetMemberNickInfo(g)
							}
						}
					},
					onFail : function() {
					},
					sscope : f,
					fscope : f,
					arguments : {
						info : {
							acs : g
						}
					},
					cmd : "0126",
					body : f._qqclient.cs.cs0x0126(g)
				};
				this._qqclient.getCmdInfo(h);
				YAHOO.log("mf_GetMemberNickInfo")
			}
		},
		mf_act_chat_with_class : function(g, i) {
			var h = g.uin, f = this._qqclient.bdylist.allClasses[h];
			if (f) {
				this._tabsManage.mf_act_create_class(h, f.nick, i)
			}
			if (this._qqclient.uin_online_stat == this._qqclient.ONLINE_STAT_ENUM.offline) {
				return
			}
			this.mf_GetMemberRemarkInfo(g)
		},
		mf_UserlistExpand : function(g) {
			var h = e.fromEle(g);
			e.preventDefault(g);
			if (!h) {
				return
			}
			if (h.className.indexOf("s") > -1) {
				var f = c.hasClass(h, "sup2") || c.hasClass(h, "sup");
				var i = c.getNextSibling(h);
				if (!i) {
					return
				}
				c.setStyle(i, "display", (f ? "block" : "none"));
				if (f) {
					c.replaceClass(h, c.hasClass(h, "sup2") ? "sup2" : "sup", c.hasClass(h, "sup2") ? "sdown2" : "sdown")
				} else {
					c.replaceClass(h, c.hasClass(h, "sdown2") ? "sdown2" : "sdown", c.hasClass(h, "sdown2") ? "sup2" : "sup")
				}
			}
		},
		mf_ClasslistExpand : function(m) {
			var j = e.fromEle(m);
			j = c.getAncestorByClassName(j, "group") || j;
			e.preventDefault(m);
			if (!j) {
				return
			}
			var k = j.id.substr(String("qqclass_").length);
			var f = this._qqclient.bdylist.allClasses[k];
			if (f.member_got == false) {
				return
			}
			var o = this.mf_getChatUser(m) || this._qqclient.bdylist.currentClass;
			for ( var h = 0, l = this._qqclient.notify_uin_list.length; h < l; h++) {
				if (this._qqclient.notify_uin_list[h].uin == o) {
					return
				}
			}
			var n = c.getNextSibling(j);
			if (!n) {
				return
			}
			c.setStyle(n, "display", ((c.getStyle(n, "display") == "none") ? "block" : "none"));
			if (this._qqclient.uin_online_stat == this._qqclient.ONLINE_STAT_ENUM.offline) {
				return
			}
			if (f.member_nick_got == false) {
				var g = this._qqclient.cs.cs0x30_0x0f(this._qqclient.uin, this._qqclient.uin_session, o, 0, 0);
				if (g) {
					this._qqclient._tmp_callback.success = this._qqclient.send_msg_callback;
					this._qqclient._tmp_callback.failure = this._qqclient.send_msg_callback;
					this._qqclient._tmp_callback.argument.info = {
						uin : this._qqclient.uin,
						cs_cmd : 48,
						sub_cmd : 15,
						cmd_str : g
					};
					this._qqclient._tmp_callback.scope = this._qqclient;
					this._qqclient._tmp_callback.timeout = 22000;
					this._qqclient._act_conn.asyncSend("POST", this._qqclient.webqq_proxy_uri, this._qqclient._tmp_callback, g)
				}
			}
		},
		destroy : function() {
			this.mf_HideWindow();
			if (this._tabsManage) {
				this._tabsManage.destroy();
				this._tabsManage = null
			}
			if (this._sta_menu_obj) {
				this._sta_menu_obj.destroy();
				this._sta_menu_obj = null
			}
			if (this._resizeHandle) {
				this._resizeHandle.destroy();
				this._resizeHandle = null
			}
			if (this._face_panel_obj) {
				this._face_panel_obj.destroy();
				this._face_panel_obj = null
			}
			CHATTY.cls.MainPanel.superclass.destroy.call(this)
		},
		toString : function() {
			return "CHATTY.cls.MainPanel " + this.id
		}
	}
})();